mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
// https://html.spec.whatwg.org/multipage/#dom-name
|
||||||
fn SetName(&self, name: DOMString) {
|
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
|
// https://html.spec.whatwg.org/multipage/#dom-name
|
||||||
fn Name(&self) -> DOMString {
|
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
|
// https://html.spec.whatwg.org/multipage/#dom-origin
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[name-attribute.window.html]
|
|
||||||
[Window object's name IDL attribute]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue