зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #2948 - Support window.parent in the one-window case; r=Ms2ger (from jgraham:window_parent)
Source-Repo: https://github.com/servo/servo Source-Revision: da0fa6ae51e6f600b05e800f3cd9614205bd354a
This commit is contained in:
Родитель
1773a54893
Коммит
895ebb0f9f
|
@ -34,6 +34,7 @@
|
|||
//[Unforgeable] readonly attribute WindowProxy top;
|
||||
// attribute any opener;
|
||||
//readonly attribute WindowProxy parent;
|
||||
readonly attribute Window parent;
|
||||
//readonly attribute Element? frameElement;
|
||||
//WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false);
|
||||
//getter WindowProxy (unsigned long index);
|
||||
|
|
|
@ -191,6 +191,11 @@ impl<'a> WindowMethods for JSRef<'a, 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> {
|
||||
if self.performance.get().is_none() {
|
||||
let performance = Performance::new(self);
|
||||
|
|
Загрузка…
Ссылка в новой задаче