Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
functionlist.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
/*!
4
\page qtqml-javascript-functionlist.html
5
\meta {keywords} {qmltopic}
6
\title List of JavaScript Objects and Functions
7
\brief A list of objects, functions, and properties supported in QML.
8
9
This reference contains a list of objects, functions and
10
properties supported by the \l{QJSEngine}{JavaScript engine} in Qt.
11
For a detailed description, see the \l{ECMA-262} specification.
12
13
\section1 The Global Object
14
15
\section2 Value Properties
16
17
\list
18
\li \c NaN
19
\li \c Infinity
20
\li \c undefined
21
\endlist
22
23
\section2 Function Properties
24
25
\list
26
\li \c {eval(x)}
27
\li \c {parseInt(string, radix)}
28
\li \c {parseFloat(string)}
29
\li \c {isNaN(number)}
30
\li \c {isFinite(number)}
31
\li \c {decodeURI(encodedURI)}
32
\li \c {decodeURIComponent(encodedURIComponent)}
33
\li \c {encodeURI(uri)}
34
\li \c {encodeURIComponent(uriComponent)}
35
\li \c {escape(string)}
36
\li \c {unescape(string)}
37
\endlist
38
39
\section2 Constructor Properties
40
41
\list
42
\li \c Object
43
\li \c Function
44
\li \c Array
45
\li \c ArrayBuffer
46
\li \c String
47
\li \c Boolean
48
\li \c Number
49
\li \c DataView
50
\li \c Date
51
\li \c Promise
52
\li \c RegExp
53
\li \c Map
54
\li \c WeakMap
55
\li \c Set
56
\li \c WeakSet
57
\li \c SharedArrayBuffer
58
\li \c Symbol
59
\li \c Error
60
\li \c EvalError
61
\li \c RangeError
62
\li \c ReferenceError
63
\li \c SyntaxError
64
\li \c TypeError
65
\li \c URIError
66
\endlist
67
68
\section2 Other Properties
69
70
\list
71
\li \c Atomics
72
\li \c Math
73
\li \c JSON
74
\li \c Reflect
75
\li \c Proxy
76
\endlist
77
78
\section1 The Object Object
79
80
\section2 Object Constructor
81
82
\section3 Function Properties
83
84
\list
85
\li \c {getPrototypeOf(O)}
86
\li \c {setPrototypeOf(O, P)}
87
\li \c {getOwnPropertyDescriptor(O, P)}
88
\li \c {getOwnPropertyDescriptors(O)}
89
\li \c {getOwnPropertyNames(O)}
90
\li \c {getOwnPropertySymbols(O)}
91
\li \c {assign(O [, Properties])}
92
\li \c {create(O [, Properties])}
93
\li \c {defineProperty(O, P, Attributes)}
94
\li \c {defineProperties(O, Properties)}
95
\li \c {entries(O)}
96
\li \c {is(V1, V2)}
97
\li \c {keys(O)}
98
\li \c {values(O)}
99
\li \c {seal(O)}
100
\li \c {isSealed(O)}
101
\li \c {freeze(O)}
102
\li \c {isFrozen(O)}
103
\li \c {preventExtensions(O)}
104
\li \c {isExtensible(O)}
105
\endlist
106
107
\section2 Object Prototype
108
109
\section3 Function Properties
110
111
\list
112
\li \c {toString()}
113
\li \c {toLocaleString()}
114
\li \c {valueOf()}
115
\li \c {hasOwnProperty(V)}
116
\li \c {isPrototypeOf(V)}
117
\li \c {propertyIsEnumerable(V)}
118
\li \c {__defineGetter__(P, F)}
119
\li \c {__defineSetter__(P, F)}
120
\endlist
121
122
\section1 Function Objects
123
124
\section2 Function Prototype
125
126
\section3 Function Properties
127
128
\list
129
\li \c {toString()}
130
\li \c {apply(thisArg, argArray)}
131
\li \c {call(thisArg [, arg1 [, arg2, ...]])}
132
\li \c {bind((thisArg [, arg1 [, arg2, …]])}
133
\li \c {[Symbol.hasInstance](O)}
134
\endlist
135
136
\section1 Array Objects
137
138
\section2 Array Prototype Object
139
140
\section3 Function Properties
141
142
\list
143
\li \c {toString()}
144
\li \c {toLocaleString()}
145
\li \c {concat([item1 [, item2 [, ...]]])}
146
\li \c {copyWithin([item1 [, item2 [, ...]]])}
147
\li \c {entries()}
148
\li \c {fill(item [, index1 [, index2]])}
149
\li \c {join(separator)}
150
\li \c {find(callbackfn [, thisArg])} // ECMAScript 6: Added in Qt 5.9
151
\li \c {findIndex(callbackfn [, thisArg])} // ECMAScript 6: Added in Qt 5.9
152
\li \c {includes(item)}
153
\li \c {keys()}
154
\li \c {pop()}
155
\li \c {push([item1 [, item2 [, ...]]])}
156
\li \c {reverse()}
157
\li \c {shift()}
158
\li \c {slice(start, end)}
159
\li \c {sort(comparefn)}
160
\li \c {splice(start, deleteCount[, item1 [, item2 [, ...]]])}
161
\li \c {unshift([item1 [, item2 [, ...]]])}
162
\li \c {indexOf(searchElement [, fromIndex])}
163
\li \c {lastIndexOf(searchElement [, fromIndex])}
164
\li \c {every(callbackfn [, thisArg])}
165
\li \c {some(callbackfn [, thisArg])}
166
\li \c {forEach(callbackfn [, thisArg])}
167
\li \c {map(callbackfn [, thisArg])}
168
\li \c {filter(callbackfn [, thisArg])}
169
\li \c {reduce(callbackfn [, initialValue])}
170
\li \c {reduceRight(callbackfn [, initialValue])}
171
\li \c {values()}
172
\li \c {[Symbol.iterator]()}
173
\endlist
174
175
\section1 String Objects
176
177
\section2 String Prototype Object
178
179
\section3 Function Properties
180
181
\list
182
\li \c {toString()}
183
\li \c {valueOf()}
184
\li \c {charAt(pos)}
185
\li \c {charCodeAt(pos)}
186
\li \c {codePointAt(pos)}
187
\li \c {concat([string1 [, string2 [, ...]]])}
188
\li \c {endsWith(searchString [, endPosition ])} // ECMAScript 6: Added in Qt 5.8
189
\li \c {includes(searchString [, position ])} // ECMAScript 6: Added in 5.8
190
\li \c {indexOf(searchString ,position)}
191
\li \c {lastIndexOf(searchString, position)}
192
\li \c {localeCompare(that)}
193
\li \c {match(regexp)}
194
\li \c {normalize()}
195
\li \c {padEnd(length [, string])}
196
\li \c {padStart(length [, string])}
197
\li \c {repeat(count)} // ECMAScript 6: Added in Qt 5.9
198
\li \c {replace(searchValue, replaceValue)}
199
\li \c {search(regexp)}
200
\li \c {slice(start, end)}
201
\li \c {split(separator, limit)}
202
\li \c {startsWith(searchString [, position ])} // ECMAScript 6: Added in Qt 5.8
203
\li \c {substr(start, length)}
204
\li \c {substring(start, end)}
205
\li \c {toLowerCase()}
206
\li \c {toLocaleLowerCase()}
207
\li \c {toUpperCase()}
208
\li \c {toLocaleUpperCase()}
209
\li \c {trim()}
210
\li \c {[Symbol.iterator]()}
211
\endlist
212
213
Additionally, the QML engine adds the following functions to the \c String prototype:
214
\list
215
\li \l {string}{string::arg()}
216
\endlist
217
218
219
\section1 Boolean Objects
220
221
\section2 Boolean Prototype Object
222
223
\section3 Function Properties
224
225
\list
226
\li \c {toString()}
227
\li \c {valueOf()}
228
\endlist
229
230
\section1 Number Objects
231
232
\section2 Number Prototype Object
233
234
\section3 Function Properties
235
236
\list
237
\li \c {toString(radix)}
238
\li \c {toLocaleString()}
239
\li \c {valueOf()}
240
\li \c {toFixed(fractionDigits)}
241
\li \c {toExponential(fractionDigits)}
242
\li \c {toPrecision(precision)}
243
\endlist
244
245
Additionally, the QML engine adds the following functions to the \l Number prototype:
246
\list
247
\li \l {string Number::fromLocaleString(locale, number)}{fromLocaleString(locale, number)}
248
\li \l {string Number::toLocaleCurrencyString(locale, symbol)}{toLocaleCurrencyString(locale, symbol)}
249
\li \l {string Number::toLocaleString(locale, format, precision)}{toLocaleString(locale, format, precision)}
250
\endlist
251
252
\section2 The Number Object
253
254
\section3 Value Properties
255
256
\list
257
\li \c {NaN}
258
\li \c {NEGATIVE_INFINITY}
259
\li \c {POSITIVE_INFINITY}
260
\li \c {MAX_VALUE}
261
\li \c {MIN_VALUE}
262
\li \c {EPSILON} // ECMAScript 6: Added in Qt 5.8
263
\li \c {MAX_SAFE_INTEGER}
264
\li \c {MIN_SAFE_INTEGER}
265
\endlist
266
267
\section3 Function Properties
268
269
\list
270
\li \c {isFinite(x)} // ECMAScript 6: Added in Qt 5.8
271
\li \c {isInteger(x)}
272
\li \c {isSafeInteger(x)}
273
\li \c {isNaN(x)} // ECMAScript 6: Added in Qt 5.8
274
\endlist
275
276
\section1 The Math Object
277
278
\section2 Value Properties
279
280
\list
281
\li \c {E}
282
\li \c {LN10}
283
\li \c {LN2}
284
\li \c {LOG2E}
285
\li \c {LOG10E}
286
\li \c {PI}
287
\li \c {SQRT1_2}
288
\li \c {SQRT2}
289
\endlist
290
291
\section2 Function Properties
292
293
\list
294
\li \c {abs(x)}
295
\li \c {acos(x)}
296
\li \c {acosh(x)}
297
\li \c {asin(x)}
298
\li \c {asinh(x)}
299
\li \c {atan(x)}
300
\li \c {atanh(x)}
301
\li \c {atan2(y, x)}
302
\li \c {cbrt(x)}
303
\li \c {ceil(x)}
304
\li \c {clz32(x)}
305
\li \c {cos(x)}
306
\li \c {cosh(x)}
307
\li \c {exp(x)}
308
\li \c {expm1(x)}
309
\li \c {floor(x)}
310
\li \c {fround(x)}
311
\li \c {hypot(x, y)}
312
\li \c {imul(x, y)}
313
\li \c {log(x)}
314
\li \c {log10(x)}
315
\li \c {log1p(x)}
316
\li \c {log2(x)}
317
\li \c {max([value1 [, value2 [, ...]]])}
318
\li \c {min([value1 [, value2 [, ...]]])}
319
\li \c {pow(x, y)}
320
\li \c {random()}
321
\li \c {round(x)}
322
\li \c {sign(x)} // ECMAScript 6: Added in Qt 5.8
323
\li \c {sin(x)}
324
\li \c {sinh(x)}
325
\li \c {sqrt(x)}
326
\li \c {tan(x)}
327
\li \c {tanh(x)}
328
\li \c {trunc(x)}
329
\endlist
330
331
\section1 Date Objects
332
333
\section2 Date Prototype Object
334
335
\section3 Function Properties
336
337
\list
338
\li \c {toString()}
339
\li \c {toDateString()}
340
\li \c {toTimeString()}
341
\li \c {toLocaleString()}
342
\li \c {toLocaleDateString()}
343
\li \c {toLocaleTimeString()}
344
\li \c {valueOf()}
345
\li \c {getTime()}
346
\li \c {getFullYear()}
347
\li \c {getUTCFullYear()}
348
\li \c {getMonth()}
349
\li \c {getUTCMonth()}
350
\li \c {getDate()}
351
\li \c {getUTCDate()}
352
\li \c {getDay()}
353
\li \c {getUTCDay()}
354
\li \c {getHours()}
355
\li \c {getUTCHours()}
356
\li \c {getMinutes()}
357
\li \c {getUTCMinutes()}
358
\li \c {getSeconds()}
359
\li \c {getUTCSeconds()}
360
\li \c {getMilliseconds()}
361
\li \c {getUTCMilliseconds()}
362
\li \c {getTimeZoneOffset()}
363
\li \c {setTime(time)}
364
\li \c {setMilliseconds(ms)}
365
\li \c {setUTCMilliseconds(ms)}
366
\li \c {setSeconds(sec [, ms])}
367
\li \c {setUTCSeconds(sec [, ms])}
368
\li \c {setMinutes(min [, sec [, ms]])}
369
\li \c {setUTCMinutes(min [, sec [, ms]])}
370
\li \c {setHours(hour [, min [, sec [, ms]]])}
371
\li \c {setUTCHours(hour [, min [, sec [, ms]]])}
372
\li \c {setDate(date)}
373
\li \c {setUTCDate(date)}
374
\li \c {setMonth(month [, date])}
375
\li \c {setUTCMonth(month [, date])}
376
\li \c {setYear(year)}
377
\li \c {setFullYear(year [, month [, date]])}
378
\li \c {setUTCFullYear(year [, month [, date]])}
379
\li \c {toUTCString()}
380
\li \c {toGMTString()}
381
\li \c {toISOString()}
382
\li \c {toJSON()}
383
\li \c {[Symbol.toPrimitive](hint)}
384
\endlist
385
386
Additionally, the QML engine adds the following functions to the
387
\l{The Date JavaScript Object}{Date} prototype:
388
\list
389
\li \l {string Date::timeZoneUpdated()}{timeZoneUpdated()}
390
\li \l {string Date::toLocaleDateString(locale, format)}{toLocaleDateString(locale, format)}
391
\li \l {string Date::toLocaleString(locale, format)}{toLocaleString(locale, format)}
392
\li \l {string Date::toLocaleTimeString(locale, format)}{toLocaleTimeString(locale, format)}
393
\endlist
394
395
\section1 RegExp Objects
396
397
\section2 RegExp Prototype Object
398
399
\section3 Function Properties
400
401
\list
402
\li \c {exec(string)}
403
\li \c {test(string)}
404
\li \c {toString()}
405
\endlist
406
407
\section1 Error Objects
408
409
\section2 Error Prototype Object
410
411
\section3 Value Properties
412
413
\list
414
\li \c name
415
\li \c message
416
\endlist
417
418
\section3 Function Properties
419
420
\list
421
\li \c {toString()}
422
\endlist
423
424
\section1 The JSON Object
425
426
\section2 Function Properties
427
428
\list
429
\li \c {parse(text [, reviver])}
430
\li \c {stringify(value [, replacer [, space]])}
431
\endlist
432
433
*/
qtdeclarative
src
qml
doc
src
javascript
functionlist.qdoc
Generated on
for Qt by
1.16.1