Hooks
Fabricate publishes a number of events through Foundry’s Hooks
API. These events can be used to integrate with the module and extend Fabricate’s behaviour.
Table of contents
fabricate.ready
This hook is fired when Fabricate has finished initialising. It is fired after the Foundry ready
hook.
Listeners are passed a reference to the Fabricate API instance, as well as the Fabricate User Interface API instance.
Hooks.on('fabricate.ready', (fabricateAPI: FabricateAPI, fabricateUserInterfaceAPI: FabricateUserInterfaceAPI) => {
// Do something with the API
myModule.doSomethingwithThe(fabricateAPI);
// Do something with the UI API
myModule.doSomethingWithThe(fabricateUserInterfaceAPI);
});