Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prependListener support #203

Open
SachsKaylee opened this issue Aug 25, 2019 · 1 comment
Open

prependListener support #203

SachsKaylee opened this issue Aug 25, 2019 · 1 comment

Comments

@SachsKaylee
Copy link

SachsKaylee commented Aug 25, 2019

#123 mentioned prependListener support and opted to not implement it back in late 2017.

This poses a problem as prependListener turns out to be quite quicial for our current project. preprendListener also seems to be a standard Node.js API function for event emitters: https://nodejs.org/api/events.html#events_emitter_prependlistener_eventname_listener

Is there a plan to suppot this feature in the near future? / Do you accept PRs for this?

//Edit:

For now I opted to create our own library with an API compatible with eventemitter3(It compiles and runs with Phaser3 which uses eventemitter3) which I alias in our webpack.config.js(alias: { 'eventemitter3': path.resolve(__dirname, './node_modules/sahnee-eventemitter') })

Instead of implementing the preprendListener function I went for a priority parameter here, which is not standard compilant by the looks of it but much more powerful. https://github.com/Sahnee-DE/eventemitter/blob/master/src/index.ts#L104

@fabian-st
Copy link

prependListener support would be much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants