mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Support window.parent in the one-window case.
This commit is contained in:
parent
1f04ce807d
commit
881e4fcd6e
2 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
//[Unforgeable] readonly attribute WindowProxy top;
|
//[Unforgeable] readonly attribute WindowProxy top;
|
||||||
// attribute any opener;
|
// attribute any opener;
|
||||||
//readonly attribute WindowProxy parent;
|
//readonly attribute WindowProxy parent;
|
||||||
|
readonly attribute Window parent;
|
||||||
//readonly attribute Element? frameElement;
|
//readonly attribute Element? frameElement;
|
||||||
//WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false);
|
//WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false);
|
||||||
//getter WindowProxy (unsigned long index);
|
//getter WindowProxy (unsigned long index);
|
||||||
|
|
|
@ -191,6 +191,11 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
||||||
self.Window()
|
self.Window()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn Parent(&self) -> Temporary<Window> {
|
||||||
|
//TODO - Once we support iframes correctly this needs to return the parent frame
|
||||||
|
self.Window()
|
||||||
|
}
|
||||||
|
|
||||||
fn Performance(&self) -> Temporary<Performance> {
|
fn Performance(&self) -> Temporary<Performance> {
|
||||||
if self.performance.get().is_none() {
|
if self.performance.get().is_none() {
|
||||||
let performance = Performance::new(self);
|
let performance = Performance::new(self);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue