mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement most of the important WindowProxy traps
This commit is contained in:
parent
b020a015d9
commit
d54a45a2b1
5 changed files with 145 additions and 14 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue