You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, yeah, probably we should throw a DOMException with error name "NotAllowedError" for wrong MIME type (or a different name?).
And maybe we should update the one on adoptedStyleSheets to throw DOMException with name "NotAllowedError" instead of TypeError when assigned invalid stylesheets as well?
Oh, yeah, probably we should throw a DOMException with error name "NotAllowedError"
Oh, speaking of which, the spec doesn't say what the name should be for the "load failed" case.
In my ideal world, the "load failed" case and the "not text/css" case would not be distinguishable via this API. Especially because with CORB the "not text/css" case becomes the "load failed" case and the assumption is that this difference is not observable.
It's not clear to me why wrong MIME type on an
@import
leads to TypeError but other failures (CSP, say) lead to a DOMException.If we think the text/css thing really needs to be distinguishable from other load failures, doing it by the type of the exception is a bit odd.
The text was updated successfully, but these errors were encountered: