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