added origin to globalscope

This commit is contained in:
ddh 2017-04-21 18:30:06 +01:00
parent 3af69cf9bf
commit 2c6bd51bef
8 changed files with 44 additions and 8 deletions

View file

@ -13,7 +13,7 @@ use dom::globalscope::GlobalScope;
use dom::urlhelper::UrlHelper;
use dom::window::Window;
use dom_struct::dom_struct;
use servo_url::ServoUrl;
use servo_url::{MutableOrigin, ServoUrl};
#[dom_struct]
pub struct Location {
@ -60,6 +60,10 @@ impl Location {
pub fn reload_without_origin_check(&self) {
self.window.load_url(self.get_url(), true, true, None);
}
pub fn origin(&self) -> &MutableOrigin {
self.window.origin()
}
}
impl LocationMethods for Location {