1
0
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:
Kris Maglione
2008-12-01 15:08:50 +00:00
parent 855caac185
commit a2550499c8
7 changed files with 24 additions and 15 deletions

View File

@@ -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;