Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Adding and removing event listeners #20

Description

@stylesuxx

In the "real" Web Serial API it is possible to add and remove Event listener that listen on the connect and disconnect events:

serial.addEventListener('connect', connectHandler);
serial.addEventListener('disconnect', disconnectHandler);

The disconnect listener is IMHO especially important, so that one can clean up after the device has been disconnected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions