Skip to content

Handle delay when intialising wasm module #50

@louisfoster

Description

@louisfoster

If you run decode immediately after creating the WebpMachine, in some browsers this will cause an error like: Module.asm is undefined. This is because the wasm module is still loading. I fixed this in my code by adding a short delay after creating WebpMachine, however it would be cleaner if there was a way (such as promise/callback) to ensure the module has loaded, or force the decode function to wait.

I will attempt to look into this when I have time.

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