Add setTimeout and clearTimeout to plugin scope

This commit is contained in:
Dan Stillman 2022-12-10 02:10:48 -07:00
parent 45e0340787
commit e7fa5d7f9d

View file

@ -89,6 +89,10 @@ Zotero.Plugins = new function () {
scope[name] = REASONS[name];
}
Object.assign(scope, { Services, Worker, ChromeWorker, Zotero });
// Add additional global functions
scope.setTimeout = Zotero.setTimeout;
scope.clearTimeout = Zotero.clearTimeout;
scopes.set(addon.id, scope);
var uri = addon.getResourceURI().spec + 'bootstrap.js';