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

Add an global API for the EventTarget registration #9

Open
andycall opened this issue Oct 31, 2023 · 0 comments
Open

Add an global API for the EventTarget registration #9

andycall opened this issue Oct 31, 2023 · 0 comments
Milestone

Comments

@andycall
Copy link
Member

From this point forward, the custom EventTarget will be tied to the JavaScript className to bridge JavaScript and Dart.

However, some front-end bundling tools might alter the JavaScript className, shortening it for optimization purposes.

If plugin developers use these bundling tools and inadvertently modify the ClassName in their codes, unexpected bugs could occur.

We need a more explicit approach for our EventTarget registration. For example:

class YourEventTargetName extends EventTarget {}
mercury.defineEventTarget('YourEventTargetName', YourEventTargetName);
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