Skip to content

feat: support access.addEventListener('statechange') #7

@arnoson

Description

@arnoson

Right now only setting the onstatechange property is supported

const access = await navigator.requestMIDIAccess()
access.onstatechange = () => {}

But the Web Midi API also allows using an event listener:

const access = await navigator.requestMIDIAccess()
access.addEventListener('statechange', () => {})

This can be useful if you want to have multiple listeners for the statechange event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions