thegecko / webbluetooth

Node.js implementation of the Web Bluetooth Specification
https://thegecko.github.io/webbluetooth/
MIT License
148 stars 23 forks source link

addEventHandler should accept "null" to remove event handlers as per W3C specs #177

Open Apollon77 opened 6 months ago

Apollon77 commented 6 months ago

see https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-attributes

a listener, which is either null or an event listener responsible for running the event handler processing algorithm. Initially, an event handler's listener must be set to null.

I can provide a PR once #56 is in if wanted

PS: I curently work on https://github.com/project-chip/matter.js and want to get a web-bluetooth compatible BLE handler for Matter commissioning, so that developers can choose if they use it in a browser or node.js :-)

Apollon77 commented 6 months ago

@thegecko i can also do a PR then for the types package to get tthat in sync because it is missing there too

thegecko commented 5 months ago

Yes please