Closed janwidmer closed 5 years ago
gondel already provides global variables:
instead of introducing a new global variable areEventsHookedIntoCore
without prefix we should rather reuse __gondelPluginEvents
or even better extend gondelPluginEvents
to provide this feature out of the box by allowing to register a plugin only once per namespace
And we should also type the __gondelPluginEvents
global 😄 gonna propose some fixes in here.
Hey @janbiasi I took a look together with @janwidmer to address the root of the problem and found a solution which looks promising (however it will introduce a small breaking change)
Will be done in new PR
… core instances in different files
Purpose of this pull request?
What changes did you make?
use window to define a global state variable, if Core Events have been initialized.
Does this pull request introduce a breaking change?
No
Closes https://github.com/namics/gondel/issues/48