ohif-viewer/docs/latest/extensions/lifecycle/pre-registration.md

22 lines
516 B
Markdown
Raw Normal View History

# Lifecylce Hook: preRegistration
If an extension defines the `preRegistration` lifecycle hook, it is called
2019-12-07 06:49:40 +01:00
before any modules are registered in the `ExtensionManager`.
```js
export default {
id: 'MyExampleExtension',
preRegistration({ servicesManager, commandsManager, configuration }) {
console.log('Wiring up important stuff.');
window.importantStuff = () => {
console.log(configuration);
};
console.log('Important stuff has been wired.');
window.importantStuff();
},
};
```