merkle-open / gondel

🚡 Gondel is a tiny library to bootstrap frontend components
https://gondel.js.org
MIT License
36 stars 10 forks source link

Refactor getHandlers #5

Closed jantimon closed 3 years ago

jantimon commented 6 years ago

Right now the media queries plugin is using a function to find all running gondel instances for a given event name:
https://github.com/namics/gondel/blob/73a497cc8a4afe91711f00bcacead138dec741e8/packages/plugins/media-queries/src/index.ts#L12-L31

Gondel already provide getHandlers but getHandlers is limited to events which bubble through the listening component:
https://github.com/namics/gondel/blob/73a497cc8a4afe91711f00bcacead138dec741e8/packages/core/src/GondelEventRegistry.ts#L56-L121

We should discuss if it would be possible to move the code from @gondel/media-queries to @gondel/core

janwidmer commented 3 years ago

Closed due to inactivity.