mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Check for the presence of a window when working with event handlers forwarded to the window
This commit is contained in:
parent
ca73b30fcf
commit
d23b34e243
3 changed files with 12 additions and 3 deletions
|
@ -366,6 +366,9 @@ impl Document {
|
|||
self.loader.borrow_mut()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn has_browsing_context(&self) -> bool { self.has_browsing_context }
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#concept-document-bc
|
||||
#[inline]
|
||||
pub fn browsing_context(&self) -> Option<Root<BrowsingContext>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue