mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Add contentDocument support for HTMLIFrameElement. Fixes #3808.
This commit is contained in:
parent
8cb2b922ef
commit
af30484f2a
5 changed files with 61 additions and 1 deletions
|
@ -27,4 +27,18 @@ impl UrlHelper {
|
|||
Some(ref hash) => format!("#{}", hash)
|
||||
}
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/browsers.html#same-origin
|
||||
pub fn SameOrigin(urlA: &Url, urlB: &Url) -> bool {
|
||||
if urlA.host() != urlB.host() {
|
||||
return false
|
||||
}
|
||||
if urlA.scheme != urlB.scheme {
|
||||
return false
|
||||
}
|
||||
if urlA.port() != urlB.port() {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue