[556] | 1 | /****************************************************************************
|
---|
| 2 | **
|
---|
[846] | 3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
[556] | 4 | ** All rights reserved.
|
---|
| 5 | ** Contact: Nokia Corporation ([email protected])
|
---|
| 6 | **
|
---|
| 7 | ** This file is part of the documentation of the Qt Toolkit.
|
---|
| 8 | **
|
---|
[846] | 9 | ** $QT_BEGIN_LICENSE:FDL$
|
---|
[556] | 10 | ** Commercial Usage
|
---|
| 11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
| 12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
[846] | 13 | ** Software or, alternatively, in accordance with the terms contained in a
|
---|
| 14 | ** written agreement between you and Nokia.
|
---|
[556] | 15 | **
|
---|
[846] | 16 | ** GNU Free Documentation License
|
---|
| 17 | ** Alternatively, this file may be used under the terms of the GNU Free
|
---|
| 18 | ** Documentation License version 1.3 as published by the Free Software
|
---|
| 19 | ** Foundation and appearing in the file included in the packaging of this
|
---|
| 20 | ** file.
|
---|
[556] | 21 | **
|
---|
| 22 | ** If you have questions regarding the use of this file, please contact
|
---|
| 23 | ** Nokia at [email protected].
|
---|
| 24 | ** $QT_END_LICENSE$
|
---|
| 25 | **
|
---|
| 26 | ****************************************************************************/
|
---|
| 27 |
|
---|
| 28 | /*!
|
---|
| 29 | \page ecmascript.html
|
---|
| 30 | \title ECMAScript Reference
|
---|
| 31 | \brief A list of objects, functions and properties supported by QtScript.
|
---|
| 32 |
|
---|
[846] | 33 | This reference contains a list of built-in objects, functions and
|
---|
| 34 | properties supported by QtScript. For a detailed description, see
|
---|
| 35 | the \l{ECMA-262} specification.
|
---|
[556] | 36 |
|
---|
| 37 | \tableofcontents
|
---|
| 38 |
|
---|
| 39 | \section1 The Global Object
|
---|
| 40 |
|
---|
| 41 | \section2 Value Properties
|
---|
| 42 |
|
---|
| 43 | \list
|
---|
| 44 | \o NaN
|
---|
| 45 | \o Infinity
|
---|
| 46 | \o undefined
|
---|
| 47 | \endlist
|
---|
| 48 |
|
---|
| 49 | \section2 Function Properties
|
---|
| 50 |
|
---|
| 51 | \list
|
---|
| 52 | \o eval(x)
|
---|
| 53 | \o parseInt(string, radix)
|
---|
| 54 | \o parseFloat(string)
|
---|
| 55 | \o isNaN(number)
|
---|
| 56 | \o isFinite(number)
|
---|
| 57 | \o decodeURI(encodedURI)
|
---|
| 58 | \o decodeURIComponent(encodedURIComponent)
|
---|
| 59 | \o encodeURI(uri)
|
---|
| 60 | \o encodeURIComponent(uriComponent)
|
---|
| 61 | \endlist
|
---|
| 62 |
|
---|
| 63 | \section2 Constructor Properties
|
---|
| 64 |
|
---|
| 65 | \list
|
---|
| 66 | \o Object
|
---|
| 67 | \o Function
|
---|
| 68 | \o Array
|
---|
| 69 | \o String
|
---|
| 70 | \o Boolean
|
---|
| 71 | \o Number
|
---|
| 72 | \o Date
|
---|
| 73 | \o RegExp
|
---|
| 74 | \o Error
|
---|
| 75 | \o EvalError
|
---|
| 76 | \o RangeError
|
---|
| 77 | \o ReferenceError
|
---|
| 78 | \o SyntaxError
|
---|
| 79 | \o TypeError
|
---|
| 80 | \o URIError
|
---|
| 81 | \endlist
|
---|
| 82 |
|
---|
[846] | 83 | \section2 Other Properties
|
---|
| 84 |
|
---|
| 85 | \list
|
---|
| 86 | \o Math
|
---|
| 87 | \o JSON
|
---|
| 88 | \endlist
|
---|
| 89 |
|
---|
[556] | 90 | \section1 Object Objects
|
---|
| 91 |
|
---|
[846] | 92 | \section2 Object Constructor
|
---|
| 93 |
|
---|
| 94 | \section3 Function Properties
|
---|
| 95 |
|
---|
| 96 | \list
|
---|
| 97 | \o getPrototypeOf(O)
|
---|
| 98 | \o getOwnPropertyDescriptor(O, P)
|
---|
| 99 | \o getOwnPropertyNames(O)
|
---|
| 100 | \o create(O [, Properties])
|
---|
| 101 | \o defineProperty(O, P, Attributes)
|
---|
| 102 | \o defineProperties(O, Properties)
|
---|
| 103 | \o keys(O)
|
---|
| 104 | \endlist
|
---|
| 105 |
|
---|
[556] | 106 | \section2 Object Prototype Object
|
---|
| 107 |
|
---|
[846] | 108 | \section3 Function Properties
|
---|
| 109 |
|
---|
[556] | 110 | \list
|
---|
| 111 | \o toString()
|
---|
| 112 | \o toLocaleString()
|
---|
| 113 | \o valueOf()
|
---|
| 114 | \o hasOwnProperty(V)
|
---|
| 115 | \o isPrototypeOf(V)
|
---|
| 116 | \o propertyIsEnumerable(V)
|
---|
| 117 | \endlist
|
---|
| 118 |
|
---|
| 119 | \section1 Function Objects
|
---|
| 120 |
|
---|
| 121 | \section2 Function Prototype Object
|
---|
| 122 |
|
---|
| 123 | \section3 Function Properties
|
---|
| 124 |
|
---|
| 125 | \list
|
---|
| 126 | \o toString()
|
---|
| 127 | \o apply(thisArg, argArray)
|
---|
| 128 | \o call(thisArg [, arg1 [, arg2, ...]])
|
---|
| 129 | \endlist
|
---|
| 130 |
|
---|
| 131 | \section1 Array Objects
|
---|
| 132 |
|
---|
| 133 | \section2 Array Prototype Object
|
---|
| 134 |
|
---|
| 135 | \section3 Function Properties
|
---|
| 136 |
|
---|
| 137 | \list
|
---|
| 138 | \o toString()
|
---|
| 139 | \o toLocaleString()
|
---|
| 140 | \o concat([item1 [, item2 [, ...]]])
|
---|
| 141 | \o join(separator)
|
---|
| 142 | \o pop()
|
---|
| 143 | \o push([item1 [, item2 [, ...]]])
|
---|
| 144 | \o reverse()
|
---|
| 145 | \o shift()
|
---|
| 146 | \o slice(start, end)
|
---|
| 147 | \o sort(comparefn)
|
---|
| 148 | \o splice(start, deleteCount[, item1 [, item2 [, ...]]])
|
---|
| 149 | \o unshift([item1 [, item2 [, ...]]])
|
---|
[846] | 150 | \o indexOf(searchElement [, fromIndex])
|
---|
| 151 | \o lastIndexOf(searchElement [, fromIndex])
|
---|
| 152 | \o every(callbackfn [, thisArg])
|
---|
| 153 | \o some(callbackfn [, thisArg])
|
---|
| 154 | \o forEach(callbackfn [, thisArg])
|
---|
| 155 | \o map(callbackfn [, thisArg])
|
---|
| 156 | \o filter(callbackfn [, thisArg])
|
---|
| 157 | \o reduce(callbackfn [, initialValue])
|
---|
| 158 | \o reduceRight(callbackfn [, initialValue])
|
---|
[556] | 159 | \endlist
|
---|
| 160 |
|
---|
| 161 | \section1 String Objects
|
---|
| 162 |
|
---|
| 163 | \section2 String Prototype Object
|
---|
| 164 |
|
---|
| 165 | \section3 Function Properties
|
---|
| 166 |
|
---|
| 167 | \list
|
---|
| 168 | \o toString()
|
---|
| 169 | \o valueOf()
|
---|
| 170 | \o charAt(pos)
|
---|
| 171 | \o charCodeAt(pos)
|
---|
| 172 | \o concat([string1 [, string2 [, ...]]])
|
---|
| 173 | \o indexOf(searchString ,position)
|
---|
| 174 | \o lastIndexOf(searchString, position)
|
---|
| 175 | \o localeCompare(that)
|
---|
| 176 | \o match(regexp)
|
---|
| 177 | \o replace(searchValue, replaceValue)
|
---|
| 178 | \o search(regexp)
|
---|
| 179 | \o slice(start, end)
|
---|
| 180 | \o split(separator, limit)
|
---|
| 181 | \o substring(start, end)
|
---|
| 182 | \o toLowerCase()
|
---|
| 183 | \o toLocaleLowerCase()
|
---|
| 184 | \o toUpperCase()
|
---|
| 185 | \o toLocaleUpperCase()
|
---|
[846] | 186 | \o trim()
|
---|
[556] | 187 | \endlist
|
---|
| 188 |
|
---|
| 189 | \section1 Boolean Objects
|
---|
| 190 |
|
---|
| 191 | \section2 Boolean Prototype Object
|
---|
| 192 |
|
---|
| 193 | \section3 Function Properties
|
---|
| 194 |
|
---|
| 195 | \list
|
---|
| 196 | \o toString()
|
---|
| 197 | \o valueOf()
|
---|
| 198 | \endlist
|
---|
| 199 |
|
---|
| 200 | \section1 Number Objects
|
---|
| 201 |
|
---|
| 202 | \section2 Number Prototype Object
|
---|
| 203 |
|
---|
| 204 | \section3 Function Properties
|
---|
| 205 |
|
---|
| 206 | \list
|
---|
| 207 | \o toString(radix)
|
---|
| 208 | \o toLocaleString()
|
---|
| 209 | \o toFixed(fractionDigits)
|
---|
| 210 | \o toExponential(fractionDigits)
|
---|
| 211 | \o toPrecision(precision)
|
---|
| 212 | \endlist
|
---|
| 213 |
|
---|
| 214 | \section1 The Math Object
|
---|
| 215 |
|
---|
| 216 | \section2 Value Properties
|
---|
| 217 |
|
---|
| 218 | \list
|
---|
| 219 | \o E
|
---|
| 220 | \o LN10
|
---|
| 221 | \o LN2
|
---|
| 222 | \o LOG2E
|
---|
| 223 | \o LOG10E
|
---|
| 224 | \o PI
|
---|
| 225 | \o SQRT1_2
|
---|
| 226 | \o SQRT2
|
---|
| 227 | \endlist
|
---|
| 228 |
|
---|
| 229 | \section2 Function Properties
|
---|
| 230 |
|
---|
| 231 | \list
|
---|
| 232 | \o abs(x)
|
---|
| 233 | \o acos(x)
|
---|
| 234 | \o asin(x)
|
---|
| 235 | \o atan(x)
|
---|
| 236 | \o atan2(y, x)
|
---|
| 237 | \o ceil(x)
|
---|
| 238 | \o cos(x)
|
---|
| 239 | \o exp(x)
|
---|
| 240 | \o floor(x)
|
---|
| 241 | \o log(x)
|
---|
| 242 | \o max([value1 [, value2 [, ...]]])
|
---|
| 243 | \o min([value1 [, value2 [, ...]]])
|
---|
| 244 | \o pow(x, y)
|
---|
| 245 | \o random()
|
---|
| 246 | \o round(x)
|
---|
| 247 | \o sin(x)
|
---|
| 248 | \o sqrt(x)
|
---|
| 249 | \o tan(x)
|
---|
| 250 | \endlist
|
---|
| 251 |
|
---|
| 252 | \section1 Date Objects
|
---|
| 253 |
|
---|
| 254 | \section2 Date Prototype Object
|
---|
| 255 |
|
---|
| 256 | \section3 Function Properties
|
---|
| 257 |
|
---|
| 258 | \list
|
---|
| 259 | \o toString()
|
---|
| 260 | \o toDateString()
|
---|
| 261 | \o toTimeString()
|
---|
| 262 | \o toLocaleString()
|
---|
| 263 | \o toLocaleDateString()
|
---|
| 264 | \o toLocaleTimeString()
|
---|
| 265 | \o valueOf()
|
---|
| 266 | \o getTime()
|
---|
| 267 | \o getFullYear()
|
---|
| 268 | \o getUTCFullYear()
|
---|
| 269 | \o getMonth()
|
---|
| 270 | \o getUTCMonth()
|
---|
| 271 | \o getDate()
|
---|
| 272 | \o getUTCDate()
|
---|
| 273 | \o getDay()
|
---|
| 274 | \o getUTCDay()
|
---|
| 275 | \o getHours()
|
---|
| 276 | \o getUTCHours()
|
---|
| 277 | \o getMinutes()
|
---|
| 278 | \o getUTCMinutes()
|
---|
| 279 | \o getSeconds()
|
---|
| 280 | \o getUTCSeconds()
|
---|
| 281 | \o getMilliseconds()
|
---|
| 282 | \o getUTCMilliseconds()
|
---|
| 283 | \o getTimeZoneOffset()
|
---|
| 284 | \o setTime(time)
|
---|
| 285 | \o setMilliseconds(ms)
|
---|
| 286 | \o setUTCMilliseconds(ms)
|
---|
| 287 | \o setSeconds(sec [, ms])
|
---|
| 288 | \o setUTCSeconds(sec [, ms])
|
---|
| 289 | \o setMinutes(min [, sec [, ms]])
|
---|
| 290 | \o setUTCMinutes(min [, sec [, ms]])
|
---|
| 291 | \o setHours(hour [, min [, sec [, ms]]])
|
---|
| 292 | \o setUTCHours(hour [, min [, sec [, ms]]])
|
---|
| 293 | \o setDate(date)
|
---|
| 294 | \o setUTCDate(date)
|
---|
| 295 | \o setMonth(month [, date])
|
---|
| 296 | \o setUTCMonth(month [, date])
|
---|
| 297 | \o setFullYear(year [, month [, date]])
|
---|
| 298 | \o setUTCFullYear(year [, month [, date]])
|
---|
| 299 | \o toUTCString()
|
---|
[846] | 300 | \o toISOString()
|
---|
| 301 | \o toJSON()
|
---|
[556] | 302 | \endlist
|
---|
| 303 |
|
---|
| 304 | \section1 RegExp Objects
|
---|
| 305 |
|
---|
| 306 | \section2 RegExp Prototype Object
|
---|
| 307 |
|
---|
| 308 | \section3 Function Properties
|
---|
| 309 |
|
---|
| 310 | \list
|
---|
| 311 | \o exec(string)
|
---|
| 312 | \o test(string)
|
---|
| 313 | \o toString()
|
---|
| 314 | \endlist
|
---|
| 315 |
|
---|
| 316 | \section1 Error Objects
|
---|
| 317 |
|
---|
| 318 | \section2 Error Prototype Object
|
---|
| 319 |
|
---|
| 320 | \section3 Value Properties
|
---|
| 321 |
|
---|
| 322 | \list
|
---|
| 323 | \o name
|
---|
| 324 | \o message
|
---|
| 325 | \endlist
|
---|
| 326 |
|
---|
| 327 | \section3 Function Properties
|
---|
| 328 |
|
---|
| 329 | \list
|
---|
| 330 | \o toString()
|
---|
| 331 | \endlist
|
---|
| 332 |
|
---|
[846] | 333 | \section1 The JSON Object
|
---|
| 334 |
|
---|
| 335 | \section2 Function Properties
|
---|
| 336 |
|
---|
| 337 | \list
|
---|
| 338 | \o parse(text [, reviver])
|
---|
| 339 | \o stringify(value [, replacer [, space]])
|
---|
| 340 | \endlist
|
---|
| 341 |
|
---|
[556] | 342 | */
|
---|