Skip to content

Conversation

@KurtCattiSchmidt
Copy link
Contributor

Per whatwg/html#10233, as="json" and as="style" should be supported for <link type="modulepreload>". This PR adds tests for this.

In the PR to update the HTML5 spec for these changes, it was also recommended that support for <link type="preload" as="json>" be removed, as it only makes sense in a module context. This change also updates tests for that scenario.

@KurtCattiSchmidt
Copy link
Contributor Author

@annevk FYI

});
}, 'link rel=modulepreload');

promise_test(function(t) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a utility function that accepts the different URLs and as values?

link.rel = 'modulepreload';
link.as = "style";
link.href = 'resources/syntax-error.css';
return attachAndWaitForLoad(link);
Copy link
Contributor

Choose a reason for hiding this comment

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

What is being tested here? Should we add asserts?

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.

3 participants