helper function for plugins to create new hooks
This commit is contained in:
parent
2a35330fb7
commit
2e4b54e868
@ -85,6 +85,13 @@ window.runHooks = function(event, data) {
|
||||
return !interrupted;
|
||||
}
|
||||
|
||||
// helper method to allow plugins to create new hooks
|
||||
window.pluginCreateHook = function(event) {
|
||||
if($.inArray(event, window.VALID_HOOKS) < 0) {
|
||||
window.VALID_HOOKS.push(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
window.addHook = function(event, callback) {
|
||||
if(VALID_HOOKS.indexOf(event) === -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user