Disable @import in replace() and replaceSync() #22374
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CSSWG resolved [1] that "@import doesn't parse in constructable
stylesheets and as a result throw syntax errors". We have a comment [2]
requesting clarification, but the working assumption is:
@import, and issue a console warning.
the @import, and issue a console warning.
rule will throw a SyntaxError. (no change here)
Prior to this CL, the behavior of Chromium was:
returned Promise would resolve once all @imports were loaded. Any
invalid @import rules would cause a NetworkError to be thrown.
a "NotAllowed" exception.
rule will throw a SyntaxError.
The Intent to Remove for this change is at [3].
[1] WICG/construct-stylesheets#119 (comment)
[2] WICG/construct-stylesheets#119 (comment)
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/RKG8oxp22RY/m/fdFnG1rGCgAJ
Bug: 1055943
Change-Id: I0a8444289b137b4c2880be5231696bb526331107
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106996
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756894}