Add XPCOM clearTimeout() and remove Zotero.wait()

Properly emulate setTimeout() with support for cancelling timers.
This commit is contained in:
Dan Stillman 2016-05-17 11:49:13 -04:00
parent a285e97815
commit 6907af86fd
2 changed files with 31 additions and 69 deletions

View file

@ -178,7 +178,11 @@ ZoteroContext.prototype = {
* Convenience method to replicate window.setTimeout()
**/
"setTimeout":function setTimeout(func, ms){
this.Zotero.setTimeout(func, ms);
return this.Zotero.setTimeout(func, ms);
},
"clearTimeout":function setTimeout(id) {
this.Zotero.clearTimeout(id);
},
/**