mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
add origin to location and url api
This commit is contained in:
parent
1ba1fb0b7f
commit
1ee9ccba21
11 changed files with 62 additions and 607 deletions
|
@ -81,6 +81,11 @@ impl LocationMethods for Location {
|
|||
self.set_url_component(value, UrlHelper::SetHost);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-location-origin
|
||||
fn Origin(&self) -> USVString {
|
||||
UrlHelper::Origin(&self.get_url())
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-location-hostname
|
||||
fn Hostname(&self) -> USVString {
|
||||
UrlHelper::Hostname(&self.get_url())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue