Add contentDocument support for HTMLIFrameElement. Fixes #3808.

This commit is contained in:
Tomasz Kołodziejski 2014-11-10 14:42:59 -08:00
parent 8cb2b922ef
commit af30484f2a
5 changed files with 61 additions and 1 deletions

View file

@ -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
}
}