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:
James Graham 2014-07-31 10:49:28 +02:00
Родитель 1773a54893
Коммит 895ebb0f9f
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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);