XMLHttpRequest (see the [Mozilla documentation]
(https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) object needed for AJAX requests
(or Swift) application without the need to use a hidden WebView.
This library tries to implement the full XMLHttpRequest specification. Currently not all functionality is implemented yet. The current limitations are:
onerrorcallbacks are currently not supported.
uploadcallback is currently not supported.
timeoutproperty is currently not supported.
It is planned to support all functionality of the HTML5 specification at some point.
Create a new instance of the
XMLHTTPRequest class. Then call the
extend: method and pass either
JSContext instance or a
JSValue instance. The given object will be extend with the
... JSContext *jsContext = [JSContext new]; XMLHttpRequest *xmlHttpRequest = [XMLHttpRequest new]; [xmlHttpRequest extend:jsContext];
request.open('GET', 'http://example.com'); request.setRequestHeader('Accept', 'text/html'); request.setRequestHeader('X-Foo', 'bar'); request.send();
a window timers implementation (
setInterval, ...) called [WindowTimers]