mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
added hooks and transculsions
This commit is contained in:
parent
4c5235162e
commit
7feb491abd
9 changed files with 92 additions and 26 deletions
11
fpjs/render/hooks.js
Normal file
11
fpjs/render/hooks.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
FP.Hooks = (function(){
|
||||
|
||||
"use strict";
|
||||
return {
|
||||
register: function(name) {
|
||||
if(this[name] === undefined) { this[name] = {}; }
|
||||
if(typeof this[name] !== 'object') { throw "Already registered: "+name; }
|
||||
return this[name];
|
||||
}
|
||||
};
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue