Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worklet script must be an ES module script #28

Open
kazssym opened this issue Aug 25, 2020 · 2 comments
Open

Worklet script must be an ES module script #28

kazssym opened this issue Aug 25, 2020 · 2 comments

Comments

@kazssym
Copy link

kazssym commented Aug 25, 2020

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

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

@kazssym
Copy link
Author

kazssym commented Aug 25, 2020

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

@kazssym
Copy link
Author

kazssym commented Aug 26, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant