mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
refactor: add CanGc as argument to methods in Document (#36392)
Add CanGc as arguments in methods in Document Testing: These changes do not require tests because they are a refactor. Addressed part of https://github.com/servo/servo/issues/34573. Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
9bdc46d66b
commit
76e0b8ec06
6 changed files with 61 additions and 55 deletions
|
@ -1523,7 +1523,9 @@ impl WindowMethods<crate::DomTypeHolder> for Window {
|
|||
|
||||
// https://w3c.github.io/selection-api/#dom-window-getselection
|
||||
fn GetSelection(&self) -> Option<DomRoot<Selection>> {
|
||||
self.document.get().and_then(|d| d.GetSelection())
|
||||
self.document
|
||||
.get()
|
||||
.and_then(|d| d.GetSelection(CanGc::note()))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-window-event
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue