XMLHttpRequest
Generated.swift:18719class XMLHttpRequest
class XMLHttpRequest
import DOM
class XMLHttpRequestEventTarget
protocol ConstructibleFromJSValue
Types conforming to this protocol can be constructed from JSValue
.
protocol ConvertibleToJSValue
Objects that can be converted to a JavaScript value, preferably in a lossless manner.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol JSBridgedClass : JSBridgedType
Conform to this protocol when your Swift class wraps a JavaScript class.
protocol JSBridgedType : ConstructibleFromJSValue, ConvertibleToJSValue, CustomStringConvertible
Use this protocol when your type has no single JavaScript class. For example, a union type of multiple classes or primitive values.
convenience init()
required init(unsafelyWrapping jsObject: JSObject)
static let DONE: UInt16
static let HEADERS_RECEIVED: UInt16
static let LOADING: UInt16
static let OPENED: UInt16
static let UNSENT: UInt16
override class var constructor: JSFunction? { get }
@ClosureAttribute1Optional var onreadystatechange: EventHandler { get set }
@ReadonlyAttribute var readyState: UInt16 { get }
@ReadonlyAttribute var response: JSValue { get }
@ReadonlyAttribute var responseText: String { get }
@ReadWriteAttribute var responseType: XMLHttpRequestResponseType { get set }
@ReadonlyAttribute var responseURL: String { get }
@ReadonlyAttribute var responseXML: Document? { get }
@ReadonlyAttribute var status: UInt16 { get }
@ReadonlyAttribute var statusText: String { get }
@ReadWriteAttribute var timeout: UInt32 { get set }
@ReadonlyAttribute var upload: XMLHttpRequestUpload { get }
@ReadWriteAttribute var withCredentials: Bool { get set }
func abort()
func getAllResponseHeaders() -> String
func getResponseHeader(name: String) -> String?
func open(method: String, url: String)
func open(method: String, url: String, async: Bool, username: String? = nil, password: String? = nil)
func overrideMimeType(mime: String)
func send(body: Document_or_XMLHttpRequestBodyInit? = nil)
func setRequestHeader(name: String, value: String)