Skip to content

[webassembly] element.onclick = async fn fails #14400

@WebReflection

Description

@WebReflection

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues matching this bug, and didn't find any.

Port, board and/or hardware

webassembly PyScript port

MicroPython version

latest

Reproduction

async def thing(event):
    print(event)

element.onclick = thing

There's no way to have an async listener.

Expected behaviour

in JS and other runtimes, element.onclick = async_ref works, in MicroPython nothing happens ... async def(): are all ignored when assigned, either via run or runAsync utilities.

Observed behaviour

in JS and other runtimes, element.onclick = async_ref works, in MicroPython nothing happens ... async def(): are all ignored when assigned, either via run or runAsync utilities.

Additional Information

No, I've provided everything above.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions