mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
window.name deals with lack of browsing context
This commit is contained in:
parent
576394b288
commit
e80fdede4c
2 changed files with 7 additions and 6 deletions
|
@ -1160,12 +1160,17 @@ impl WindowMethods for Window {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-name
|
||||
fn SetName(&self, name: DOMString) {
|
||||
self.window_proxy().set_name(name);
|
||||
if let Some(proxy) = self.undiscarded_window_proxy() {
|
||||
proxy.set_name(name);
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-name
|
||||
fn Name(&self) -> DOMString {
|
||||
self.window_proxy().get_name()
|
||||
match self.undiscarded_window_proxy() {
|
||||
Some(proxy) => proxy.get_name(),
|
||||
None => "".into(),
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-origin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue