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

Consider using a generic Event #73

Closed
reillyeon opened this issue Oct 15, 2019 · 2 comments
Closed

Consider using a generic Event #73

reillyeon opened this issue Oct 15, 2019 · 2 comments

Comments

@reillyeon
Copy link
Collaborator

The proposed WebIDL for this API includes a SerialConnectionEvent. The TAG design principles suggest using a generic event and storing state in the target attribute. This change would require moving the connect and disconnect event handler attributes to the SerialPort interface and defining that events bubble from SerialPort instances to the singleton Serial instance.

@domenic
Copy link
Collaborator

domenic commented Aug 7, 2020

I think this advice isn't as applicable here, because the port is not itself an EventTarget, and thus cannot be the target of the event. A custom event subclass seems very reasonable for this case.

@reillyeon
Copy link
Collaborator Author

This was fixed by #105.

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