XMLHttpRequest: XMLHttpRequest() constructor
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Note: This feature is available in Web Workers, except for Service Workers.
The XMLHttpRequest()
constructor
creates a new XMLHttpRequest
.
Syntax
js
new XMLHttpRequest()
// Non-standard
new XMLHttpRequest(options)
Parameters
There are no standard parameters. However, Firefox allows a non-standard parameter:
options
Non-standard-
An object that can contain the following flag:
Return value
A new XMLHttpRequest
object. The object must be prepared by at least
calling open()
to initialize it before calling
send()
to send the request to the server.
Specifications
Specification |
---|
XMLHttpRequest # dom-xmlhttprequest |
Browser compatibility
Loading BCD table