mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
added origin to globalscope
This commit is contained in:
parent
3af69cf9bf
commit
2c6bd51bef
8 changed files with 44 additions and 8 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue