5118 Create Javascript hook mechanism
This commit is contained in:
12
view/js/addon-hooks.js
Normal file
12
view/js/addon-hooks.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var addon_hooks={};
|
||||
|
||||
function Addon_registerHook( type, hookfnstr )
|
||||
{
|
||||
if (!addon_hooks.hasOwnProperty(type)) {
|
||||
addon_hooks[type]=[];
|
||||
}
|
||||
|
||||
addon_hooks[type].push( hookfnstr );
|
||||
|
||||
console.log("addon_hooks type "+type+" has "+addon_hooks[type].length+" hooks registered");
|
||||
}
|
||||
Reference in New Issue
Block a user