mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
issue #10141 : Document::location set null for documents without a browsing context. r=Ms2ger
This commit is contained in:
parent
32e53b80e2
commit
6626c5cfd4
9 changed files with 6 additions and 27 deletions
|
@ -2423,8 +2423,8 @@ impl DocumentMethods for Document {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-document-location
|
||||
fn Location(&self) -> Root<Location> {
|
||||
self.location.or_init(|| Location::new(&self.window))
|
||||
fn GetLocation(&self) -> Option<Root<Location>> {
|
||||
self.browsing_context().map(|_| self.location.or_init(|| Location::new(&self.window)))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-parentnode-children
|
||||
|
@ -2777,4 +2777,3 @@ pub enum FocusEventType {
|
|||
Focus, // Element gained focus. Doesn't bubble.
|
||||
Blur, // Element lost focus. Doesn't bubble.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue