mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: complete resolve_module_specifier
(#37552)
Implement whole spec of `resolve_module_specifier`. Servo can now support script element with import map type! Testing: `tests/wpt/tests/import-map` Fixes: #37316 #36394 --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
This commit is contained in:
parent
d7269c0f3b
commit
927573de97
35 changed files with 376 additions and 281 deletions
|
@ -105,6 +105,17 @@ impl ServoUrl {
|
|||
scheme == "about" || scheme == "blob" || scheme == "data"
|
||||
}
|
||||
|
||||
/// <https://url.spec.whatwg.org/#special-scheme>
|
||||
pub fn is_special_scheme(&self) -> bool {
|
||||
let scheme = self.scheme();
|
||||
scheme == "ftp" ||
|
||||
scheme == "file" ||
|
||||
scheme == "http" ||
|
||||
scheme == "https" ||
|
||||
scheme == "ws" ||
|
||||
scheme == "wss"
|
||||
}
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
self.0.as_str()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue