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