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);
|
||||
}
|
||||
|
||||
if ty.to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS) == "importmap" {
|
||||
return Some(ScriptType::ImportMap);
|
||||
}
|
||||
|
||||
if SCRIPT_JS_MIMES
|
||||
.contains(&ty.to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue