mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
feat(script): create import map parse result (#37405)
Implement import map parser Spec: https://html.spec.whatwg.org/multipage/#create-an-import-map-parse-result - Create an import map parse result - Sorting and normalizing a module specifier map - Sorting and normalizing scopes - Normalizing a module integrity map Testing: should pass current WPT Fixes: part of https://github.com/servo/servo/issues/37316 --------- Signed-off-by: Jason Tsai <git@pews.dev> Co-authored-by: Wu Yu Wei <yuweiwu@pm.me>
This commit is contained in:
parent
f242c120b6
commit
41bed9840a
2 changed files with 338 additions and 4 deletions
|
@ -76,6 +76,7 @@ use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingLi
|
|||
use crate::realms::enter_realm;
|
||||
use crate::script_module::{
|
||||
ModuleOwner, ScriptFetchOptions, fetch_external_module_script, fetch_inline_module_script,
|
||||
parse_an_import_map_string,
|
||||
};
|
||||
use crate::script_runtime::CanGc;
|
||||
use crate::task_source::{SendableTaskSource, TaskSourceName};
|
||||
|
@ -967,8 +968,14 @@ impl HTMLScriptElement {
|
|||
);
|
||||
},
|
||||
ScriptType::ImportMap => {
|
||||
// TODO: Let result be the result of creating an import map
|
||||
// Step 32.1 Let result be the result of creating an import map
|
||||
// parse result given source text and base URL.
|
||||
let _result = parse_an_import_map_string(
|
||||
ModuleOwner::Window(Trusted::new(self)),
|
||||
text_rc,
|
||||
base_url.clone(),
|
||||
can_gc,
|
||||
);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue