Skip to content

Test that dynamic import() is disallowed in paint worklets#26175

Merged
domenic merged 2 commits intomasterfrom
worklet-dynamic-import
Dec 10, 2020
Merged

Test that dynamic import() is disallowed in paint worklets#26175
domenic merged 2 commits intomasterfrom
worklet-dynamic-import

Conversation

@domenic
Copy link
Copy Markdown
Member

@domenic domenic commented Oct 19, 2020

Follows whatwg/html#6070.

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also update the README.md while here.

try {
await import('./resources/imported-module.mjs');
} catch (e) {
if (e.constructor === TypeError) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also check .name as testharness.js seems to do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, the only way .name would be different would be if someone mucked with TypeError.prototype.name, which seems unlikely?

@domenic domenic merged commit 43fb3b2 into master Dec 10, 2020
@domenic domenic deleted the worklet-dynamic-import branch December 10, 2020 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants