GoogleChromeLabs/audioworklet-polyfill

Worklet script must be an ES module script

kazssym opened this issue · 2 comments

const script = doc.createElement('script');

Supplied worklet modules must be loaded as module scripts according to https://drafts.css-houdini.org/worklets/#code-idempotency.

It probably needs script.type = 'module' after the element creation.

It probably needs script.type = 'module' after the element creation.

I was wrong. I have learned module scripts cannot be eval()ed. It must be rewritten using import() somehow.