Implement most of the important WindowProxy traps

This commit is contained in:
Tom Schuster 2015-01-09 16:36:05 +01:00
parent b020a015d9
commit d54a45a2b1
5 changed files with 145 additions and 14 deletions

View file

@ -311,12 +311,12 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
}
}
pub trait WindowHelpers {
fn flush_layout(self, goal: ReflowGoal, query: ReflowQueryType);
fn init_browser_context(self, doc: JSRef<Document>);
fn load_url(self, href: DOMString);
fn handle_fire_timer(self, timer_id: TimerId);
fn IndexedGetter(self, _index: u32, _found: &mut bool) -> Option<Temporary<Window>>;
}
pub trait ScriptHelpers {
@ -378,6 +378,11 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
self.timers.fire_timer(timer_id, self);
self.flush_layout(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
}
// https://html.spec.whatwg.org/multipage/browsers.html#accessing-other-browsing-contexts
fn IndexedGetter(self, _index: u32, _found: &mut bool) -> Option<Temporary<Window>> {
None
}
}
impl Window {