mirror of
https://github.com/servo/servo.git
synced 2025-06-25 17:44:33 +01:00
feat(script): parse script element importmap
type (#37547)
Support parsing script element to `importmap` type Testing: Pass WPT Fixes: part of https://github.com/servo/servo/issues/37316 Signed-off-by: Jason Tsai <git@pews.dev>
This commit is contained in:
parent
49be5ca05a
commit
07ecf34e64
2 changed files with 4 additions and 10 deletions
|
@ -1313,6 +1313,10 @@ impl HTMLScriptElement {
|
||||||
return Some(ScriptType::Module);
|
return Some(ScriptType::Module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ty.to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS) == "importmap" {
|
||||||
|
return Some(ScriptType::ImportMap);
|
||||||
|
}
|
||||||
|
|
||||||
if SCRIPT_JS_MIMES
|
if SCRIPT_JS_MIMES
|
||||||
.contains(&ty.to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS))
|
.contains(&ty.to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
[external-import-map-errors.html]
|
|
||||||
expected: TIMEOUT
|
|
||||||
[Test that an external import map fires an error event]
|
|
||||||
expected: TIMEOUT
|
|
||||||
|
|
||||||
[Test that an external import map fires an error event, regardless of attribute order]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
[Test that an external import map in markup fires an error event]
|
|
||||||
expected: NOTRUN
|
|
Loading…
Add table
Add a link
Reference in a new issue