270ef7531a89945fad8b709111b467211ccb3d5c
[roojs1] / docs / symbols / Function.json
1 {
2   "name" : "Function",
3   "augments" : [
4   ],
5   "desc" : "These functions are available on every Function object (any JavaScript function).",
6   "isSingleton" : false,
7   "isStatic" : false,
8   "isBuiltin" : true,
9   "memberOf" : "Function",
10   "example" : "",
11   "deprecated" : "",
12   "since" : "",
13   "see" : "",
14   "params" : [
15   ],
16   "returns" : [
17   ],
18   "config" : [
19   ],
20   "methods" : [
21     {
22       "name" : "createDelegate",
23       "desc" : "Creates a delegate (callback) that sets the scope to obj.\nCall directly on any function. Example: <code>this.myFunction.createDelegate(this)</code>\nWill create a function that is automatically scoped to this.",
24       "isStatic" : false,
25       "isConstructor" : false,
26       "isPrivate" : false,
27       "memberOf" : "Function",
28       "example" : "",
29       "deprecated" : "",
30       "since" : "",
31       "see" : "",
32       "params" : [
33         {
34           "name" : "obj",
35           "type" : "Object",
36           "desc" : "(optional) The object for which the scope is set",
37           "isOptional" : false
38         },
39         {
40           "name" : "args",
41           "type" : "Array",
42           "desc" : "(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)",
43           "isOptional" : false
44         },
45         {
46           "name" : "appendArgs",
47           "type" : "Boolean/Number",
48           "desc" : "(optional) if True args are appended to call args instead of overriding,\n                                            if a number the args are inserted at the specified position",
49           "isOptional" : false
50         }
51       ],
52       "returns" : [
53         {
54           "name" : "",
55           "type" : "Function",
56           "desc" : "The new function"
57         }
58       ]
59     },
60     {
61       "name" : "defer",
62       "desc" : "Calls this function after the number of millseconds specified.",
63       "isStatic" : false,
64       "isConstructor" : false,
65       "isPrivate" : false,
66       "memberOf" : "Function",
67       "example" : "",
68       "deprecated" : "",
69       "since" : "",
70       "see" : "",
71       "params" : [
72         {
73           "name" : "millis",
74           "type" : "Number",
75           "desc" : "The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)",
76           "isOptional" : false
77         },
78         {
79           "name" : "obj",
80           "type" : "Object",
81           "desc" : "(optional) The object for which the scope is set",
82           "isOptional" : false
83         },
84         {
85           "name" : "args",
86           "type" : "Array",
87           "desc" : "(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)",
88           "isOptional" : false
89         },
90         {
91           "name" : "appendArgs",
92           "type" : "Boolean/Number",
93           "desc" : "(optional) if True args are appended to call args instead of overriding,\n                                            if a number the args are inserted at the specified position",
94           "isOptional" : false
95         }
96       ],
97       "returns" : [
98         {
99           "name" : "",
100           "type" : "Number",
101           "desc" : "The timeout id that can be used with clearTimeout"
102         }
103       ]
104     },
105     {
106       "name" : "createSequence",
107       "desc" : "Create a combined function call sequence of the original function + the passed function.\nThe resulting function returns the results of the original function.\nThe passed fcn is called with the parameters of the original function",
108       "isStatic" : false,
109       "isConstructor" : false,
110       "isPrivate" : false,
111       "memberOf" : "Function",
112       "example" : "",
113       "deprecated" : "",
114       "since" : "",
115       "see" : "",
116       "params" : [
117         {
118           "name" : "fcn",
119           "type" : "Function",
120           "desc" : "The function to sequence",
121           "isOptional" : false
122         },
123         {
124           "name" : "scope",
125           "type" : "Object",
126           "desc" : "(optional) The scope of the passed fcn (Defaults to scope of original function or window)",
127           "isOptional" : false
128         }
129       ],
130       "returns" : [
131         {
132           "name" : "",
133           "type" : "Function",
134           "desc" : "The new function"
135         }
136       ]
137     },
138     {
139       "name" : "createInterceptor",
140       "desc" : "Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called.\nThe resulting function returns the results of the original function.\nThe passed fcn is called with the parameters of the original function.",
141       "isStatic" : false,
142       "isConstructor" : false,
143       "isPrivate" : false,
144       "memberOf" : "Function",
145       "example" : "",
146       "deprecated" : "",
147       "since" : "",
148       "see" : "",
149       "params" : [
150         {
151           "name" : "fcn",
152           "type" : "Function",
153           "desc" : "The function to call before the original",
154           "isOptional" : false
155         },
156         {
157           "name" : "scope",
158           "type" : "Object",
159           "desc" : "(optional) The scope of the passed fcn (Defaults to scope of original function or window)",
160           "isOptional" : false
161         }
162       ],
163       "returns" : [
164         {
165           "name" : "",
166           "type" : "Function",
167           "desc" : "The new function"
168         }
169       ]
170     },
171     {
172       "name" : "createCallback",
173       "desc" : "Creates a callback that passes arguments[0], arguments[1], arguments[2], ...\nCall directly on any function. Example: <code>myFunction.createCallback(myarg, myarg2)</code>\nWill create a function that is bound to those 2 args.",
174       "isStatic" : false,
175       "isConstructor" : false,
176       "isPrivate" : false,
177       "memberOf" : "Function",
178       "example" : "",
179       "deprecated" : "",
180       "since" : "",
181       "see" : "",
182       "params" : [
183       ],
184       "returns" : [
185         {
186           "name" : "",
187           "type" : "Function",
188           "desc" : "The new function"
189         }
190       ]
191     }
192   ],
193   "events" : [
194   ]
195 }