Search completed in 0.83 seconds.
12 results for "ontimeout":
XDomainRequest.ontimeout - Web APIs
syntax xdr.
ontimeout = funcref; parameters funcref a function to be called when the event times out.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.
ontimeout = function(){ //handle timeout } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1¶m2=value2"); specification not part of any specification.
Task.jsm
let mypromise = getpromiseresolved
ontimeoutwithvalue(1000, "value"); let result = yield mypromise; // this part is executed only after the promise above is resolved (after // one second, in this imaginary example).
... for (let i = 0; i < 3; i++) { result += yield getpromiseresolved
ontimeoutwithvalue(50, "!"); } return "resolution result for the task: " + result; }).then(function (result) { // result == "resolution result for the task: value!!!" // the result is undefined if no special task.result exception was thrown.
XDomainRequest - Web APIs
xdomainrequest.
ontimeout a handler for when the request times out.
... example if(window.xdomainrequest){ var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.onprogress = function () { //progress }; xdr.
ontimeout = function () { //timeout }; xdr.onerror = function () { //error occurred }; xdr.onload = function() { //success(xdr.responsetext); } settimeout(function () { xdr.send(); }, 0); } note: the xdr.send() call is wrapped in a timeout (see window.settimeout() to prevent an issue with the interface where some requests are lost if multiple xdomainrequests are being sent at the same time.
Synchronous and asynchronous requests - Web APIs
this is done by setting the value of the timeout property on the xmlhttprequest object, as shown in the code below: function loadfile(url, timeout, callback) { var args = array.prototype.slice.call(arguments, 3); var xhr = new xmlhttprequest(); xhr.
ontimeout = function () { console.error("the request for " + url + " timed out."); }; xhr.onload = function() { if (xhr.readystate === 4) { if (xhr.status === 200) { callback.apply(xhr, args); } else { console.error(xhr.statustext); } } }; xhr.open("get", url, true); xhr.timeout = timeout; xh...
...r.send(null); } notice the addition of code to handle the "timeout" event by setting the
ontimeout handler.
XMLHttpRequest - Web APIs
xmlhttprequesteventtarget.
ontimeout is an eventhandler that is called whenever the request times out.
... also available via the
ontimeout property.
Mozprocess - Archive of obsolete content
cwd=none, # working directory for cmd; defaults to none env={}, # environment to use for the process; defaults to os.environ ) exit_code = process.waitforfinish(timeout=60) # seconds see an example in https://github.com/mozilla/mozbase/b...profilepath.py processhandler may be subclassed to handle process timeouts (by overriding the
ontimeout() method), process completion (by overriding onfinish()), and to process the command output (by overriding processoutputline()).
Index - Web APIs
5159 xdomainrequest.
ontimeout ajax, api, dom, ie, microsoft, obsolete, property, reference an event handler which is called when a pending xdomainrequest times out.
XMLHttpRequest: timeout event - Web APIs
bubbles no cancelable no interface progressevent event handler property
ontimeout examples const client = new xmlhttprequest(); client.open('get', 'http://www.example.org/example.txt'); client.
ontimeout = () => { console.error('timeout!!') }; client.send(); you could also set up the event handler using the addeventlistener() method: client.addeventlistener('timeout', () => { console.error("timeout!!"); }); specifications specification status comment xmlhttprequestthe definition of 'timeout event' in that specification.
XMLHttpRequest.upload - Web APIs
timeout
ontimeout the upload timed out because a reply did not arrive within the time interval specified by the xmlhttprequest.timeout.
XMLHttpRequestEventTarget - Web APIs
xmlhttprequesteventtarget.
ontimeout contains the function that is called if the event times out and the timeout event is received by this object; this only happens if a timeout has been previously established by setting the value of the xmlhttprequest object's timeout attribute.