Constructor
new Hook(context)
Parameters:
Name | Type | Description |
---|---|---|
context |
any | scope of this |
- Source:
Example
this.content = new Hook(this);
Methods
register() → {undefined}
Adds a function to be run before a hook completes
.Adds a function to be run before a hook completes
- Source:
Returns:
void
- Type
- undefined
Example
this.content.register(function(){...});
trigger() → {Promise}
Triggers a hook to run all functions
.Triggers a hook to run all functions
- Source:
Returns:
results
- Type
- Promise
Example
this.content.trigger(args).then(function(){...});
triggerSync() → {Array}
Triggers a hook to run all functions synchronously
.Triggers a hook to run all functions synchronously
- Source:
Returns:
results
- Type
- Array
Example
this.content.trigger(args).then(function(){...});