v1.2.0.1-beta1
|
This reference contains a list of standard ECMAScript objects, functions and properties supported by the plugin's JavaScript engine.
The Dynamic Script Engine Plugin scripting environment supports most JavaScript features up to ECMAScript level 7 (ECMA-262), as well as a handful of "Web API" features, or their close approximations.
This document lists all the supported objects and methods from the standards, with further details about items which do not fully match what is published on MDN, which is used as a reference.
In some cases the standard objects are also extended (ArrayBuffer, Date, Math, Number, String), as is the Global object, which is documented separately.
Nullish Coalescing (??) and Optional Chaining (?.) are also implemented.
Note that all Math
functions are also available in the global scope, w/out the Math.
qualifier.
(Note lack of support for BigInt types.)
at()
method)(Note lack of support for BigInt types.)
(Note that async functions/generators are not supported nor is the general async/await pattern. Use Promise instead.)
Any object type listed above but not here is presumed to have full compatibility as per MDN current documentation.
Supports all properties and methods described in MDN reference, except:
Supports all properties and methods described in MDN reference, except:
Supports all properties and methods described in MDN reference, except:
onabort()
takes an optional, and non-standard, 2nd argument after the callback. If an object is passed here then the callback function will be invoked with that object as the this
target. For example: abort()
event can be safely connect
ed directly to a method of any object. For example: setTimeout()
/clearTimeout()
and setInterval()
/clearInterval()
, are fully implemented as per standard (MDN reference), with some notes.setTimeout()
and setInterval()
do accept optional arguments after the delay parameter, which are passed through to the function being invoked .setTimeout()
and setInterval()
also accept an extended form of the first parameter, which is usually the function to invoke or string to evaluate. Instead, the first parameter can be an array with two values; the first value is the function to invoke and the second is the this
scope object for calling the function with. This can avoid using an inline function in cases where this
scope would typically be lost.clearAllTimers()
and clearInstanceTimers()
The XMLHttpRequest object, which can be used to obtain data over a network using HTTP/s protocols.
The XMLHttpRequest API implements the same W3C standard as many popular web browsers with following exceptions:
redirect
property has been added to control redirection response behavior. The options are similar to the standard Fetch API redirect
option with some additions:follow
: Automatically follow redirects. Unless otherwise stated the redirect mode is set to follow.error
: Abort with an error if a redirect occurs.manual
: Caller intends to process the response in another context.no-less-safe
: Only allow http -> http, http -> https, and https -> https redirects (do not follow https -> http redirect); This is the default.same-origin
: Only follow redirect if the original scheme, host, and port match.requestJSON
property has been added, as a counterpart to the standard responseText
and responseXML
properties. This is equivalent to xhr.responseType = "json"; var obj = xhr.response;
requestBuffer
property has also been added. This is equivalent to xhr.responseType = "arraybuffer"; var arrayBuffer = xhr.response;
open()
command, in which case open()
can be called with no parameters. Or for example the URL can be set first, then open(method)
called later.method
- GET/POST/HEADERS/etc.url
- URL of the request (can be a string or URL
object).async
- boolean value indicating whether to use asynchronous requests (default is true
).headers
property is added; This returns a two-dimensional array of header name/value pairs. For example: send()
method is called, this contains any headers explicitly added by the user with setRequestHeader()
.send()
and once the request has resolved, this will contain the response headers. These are the same headers obtained with getAllResponseHeaders()
but in a structured format, possibly including duplicates as per HTTP spec (they are not merged as they would be with getAllResponseHeaders()
).Additionally, the responseXML
XML DOM tree currently supported by DSE is a reduced subset of the DOM Level 3 Core API supported in a web browser. The following objects and properties are supported by the DSE implementation:
Node | Document | Element | Attr | CharacterData | Text |
---|---|---|---|---|---|
|
|
|
|
|
|