mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-05 08:24:11 +01:00
Allow plugins onUnload handlers, fix some threadYield issues.
This commit is contained in:
@@ -30,8 +30,13 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
plugins.contexts = {};
|
||||
function Script(name)
|
||||
{
|
||||
if (plugins.contexts[name])
|
||||
return plugins.contexts[name];
|
||||
let self = plugins.contexts[name]
|
||||
if (self)
|
||||
{
|
||||
if (self.onUnload)
|
||||
self.onUnload();
|
||||
return self;
|
||||
}
|
||||
plugins.contexts[name] = this;
|
||||
this.NAME = name;
|
||||
this.__context__ = this;
|
||||
|
||||
Reference in New Issue
Block a user