Can someone please explain this javascript syntax.
What does n: { } mean?
Does it mean that AVSetFocus returns a nobject (which has been given the temporary name, n, which consists of 'fields' t, f and a. t is an object (looks like), f is a function of the object t, and a is an array?
So AVSetFocus is returning an object and a function and an array. Does this function actually call SetFocusToField?
What is this style called?
Bit confused.
function AVSetFocus(d, b) {
return {
n: {
t: FocusMgr,
f: FocusMgr.SetFocusToField,
a: [d, b]
}
}
}
Just also found this:
var FocusMgr;
function FocusMgr_Init() {
FocusMgr = new function () {
this.mCurFocusID = 0;
this.mCurFocusWindowID = 0;
this.mCurFocusElement = null;
this.mOpenedWindow = false;
this.mFocusStk = [];
//etc
}
}