Adding Name and SetName functions for window

This commit is contained in:
paavininanda 2018-02-13 14:51:20 +05:30
parent b1d3d6f632
commit b9f7aa4686
11 changed files with 76 additions and 39 deletions

View file

@ -1019,6 +1019,16 @@ impl WindowMethods for Window {
fn TestRunner(&self) -> DomRoot<TestRunner> {
self.test_runner.or_init(|| TestRunner::new(self.upcast()))
}
// https://html.spec.whatwg.org/multipage/#dom-name
fn SetName(&self, name: DOMString) {
self.window_proxy().set_name(name);
}
// https://html.spec.whatwg.org/multipage/#dom-name
fn Name(&self) -> DOMString {
self.window_proxy().get_name()
}
}
impl Window {