mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Implement window.closed
This commit is contained in:
committed by
Mate Antunovic
parent
161dc666b0
commit
510bea7a7a
@@ -505,6 +505,13 @@ impl WindowMethods for Window {
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-window-closed
|
||||
fn Closed(&self) -> bool {
|
||||
self.window_proxy.get()
|
||||
.map(|ref proxy| proxy.is_browsing_context_discarded())
|
||||
.unwrap_or(true)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-window-close
|
||||
fn Close(&self) {
|
||||
self.main_thread_script_chan()
|
||||
|
||||
Reference in New Issue
Block a user