sync
[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   "throws" : "",
16   "requires" : "",
17   "config" : [],
18   "methods" : [
19     {
20       "name" : "createDelegate",
21       "type" : "function",
22       "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.",
23       "sig" : "(obj, args, appendArgs)",
24       "static" : false,
25       "memberOf" : "",
26       "isStatic" : false,
27       "isConstructor" : false,
28       "isPrivate" : false,
29       "example" : "",
30       "deprecated" : "",
31       "since" : "",
32       "see" : "",
33       "exceptions" : "",
34       "requires" : "",
35       "params" : [
36         {
37           "name" : "obj",
38           "type" : "Object",
39           "desc" : "(optional) The object for which the scope is set",
40           "isOptional" : false
41         },
42         {
43           "name" : "args",
44           "type" : "Array",
45           "desc" : "(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)",
46           "isOptional" : false
47         },
48         {
49           "name" : "appendArgs",
50           "type" : "Boolean/Number",
51           "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",
52           "isOptional" : false
53         }
54       ],
55       "returns" : [
56         {
57           "name" : "",
58           "type" : "Function",
59           "desc" : "The new function"
60         }
61       ]
62     },
63     {
64       "name" : "defer",
65       "type" : "function",
66       "desc" : "Calls this function after the number of millseconds specified.",
67       "sig" : "(millis, obj, args, appendArgs)",
68       "static" : false,
69       "memberOf" : "",
70       "isStatic" : false,
71       "isConstructor" : false,
72       "isPrivate" : false,
73       "example" : "",
74       "deprecated" : "",
75       "since" : "",
76       "see" : "",
77       "exceptions" : "",
78       "requires" : "",
79       "params" : [
80         {
81           "name" : "millis",
82           "type" : "Number",
83           "desc" : "The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)",
84           "isOptional" : false
85         },
86         {
87           "name" : "obj",
88           "type" : "Object",
89           "desc" : "(optional) The object for which the scope is set",
90           "isOptional" : false
91         },
92         {
93           "name" : "args",
94           "type" : "Array",
95           "desc" : "(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)",
96           "isOptional" : false
97         },
98         {
99           "name" : "appendArgs",
100           "type" : "Boolean/Number",
101           "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",
102           "isOptional" : false
103         }
104       ],
105       "returns" : [
106         {
107           "name" : "",
108           "type" : "Number",
109           "desc" : "The timeout id that can be used with clearTimeout"
110         }
111       ]
112     },
113     {
114       "name" : "createSequence",
115       "type" : "function",
116       "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",
117       "sig" : "(fcn, scope)",
118       "static" : false,
119       "memberOf" : "",
120       "isStatic" : false,
121       "isConstructor" : false,
122       "isPrivate" : false,
123       "example" : "",
124       "deprecated" : "",
125       "since" : "",
126       "see" : "",
127       "exceptions" : "",
128       "requires" : "",
129       "params" : [
130         {
131           "name" : "fcn",
132           "type" : "Function",
133           "desc" : "The function to sequence",
134           "isOptional" : false
135         },
136         {
137           "name" : "scope",
138           "type" : "Object",
139           "desc" : "(optional) The scope of the passed fcn (Defaults to scope of original function or window)",
140           "isOptional" : false
141         }
142       ],
143       "returns" : [
144         {
145           "name" : "",
146           "type" : "Function",
147           "desc" : "The new function"
148         }
149       ]
150     },
151     {
152       "name" : "createInterceptor",
153       "type" : "function",
154       "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.",
155       "sig" : "(fcn, scope)",
156       "static" : false,
157       "memberOf" : "",
158       "isStatic" : false,
159       "isConstructor" : false,
160       "isPrivate" : false,
161       "example" : "",
162       "deprecated" : "",
163       "since" : "",
164       "see" : "",
165       "exceptions" : "",
166       "requires" : "",
167       "params" : [
168         {
169           "name" : "fcn",
170           "type" : "Function",
171           "desc" : "The function to call before the original",
172           "isOptional" : false
173         },
174         {
175           "name" : "scope",
176           "type" : "Object",
177           "desc" : "(optional) The scope of the passed fcn (Defaults to scope of original function or window)",
178           "isOptional" : false
179         }
180       ],
181       "returns" : [
182         {
183           "name" : "",
184           "type" : "Function",
185           "desc" : "The new function"
186         }
187       ]
188     },
189     {
190       "name" : "createCallback",
191       "type" : "function",
192       "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.",
193       "sig" : "()\n{\n\n}",
194       "static" : false,
195       "memberOf" : "",
196       "isStatic" : false,
197       "isConstructor" : false,
198       "isPrivate" : false,
199       "example" : "",
200       "deprecated" : "",
201       "since" : "",
202       "see" : "",
203       "exceptions" : "",
204       "requires" : "",
205       "params" : [],
206       "returns" : [
207         {
208           "name" : "",
209           "type" : "Function",
210           "desc" : "The new function"
211         }
212       ]
213     }
214   ],
215   "events" : []
216 }