script: Rename CanGc::note() to CanGc::deprecated_note() (#44081)

Per the suggestion in

https://servo.zulipchat.com/#narrow/channel/263398-general/topic/PSA.3A.20avoid.20new.20usages.20of.20CanGc.20whenever.20possible/near/583995807
to mark this method as deprecated and make clear it shouldn't be used
anymore, as alternatives exist.

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe
2026-04-10 08:07:52 +02:00
committed by GitHub
parent 55e586737b
commit c8029ea092
112 changed files with 540 additions and 410 deletions

View File

@@ -538,13 +538,13 @@ impl HTMLSelectElement {
EventBubbles::Bubbles,
EventCancelable::NotCancelable,
EventComposed::Composed,
CanGc::note(),
CanGc::deprecated_note(),
);
// Step 3. Fire an event named change at the select element, with the bubbles attribute initialized
// to true.
this.upcast::<EventTarget>()
.fire_bubbling_event(atom!("change"), CanGc::note());
.fire_bubbling_event(atom!("change"), CanGc::deprecated_note());
}));
}
@@ -635,7 +635,12 @@ impl HTMLSelectElementMethods<crate::DomTypeHolder> for HTMLSelectElement {
fn Options(&self) -> DomRoot<HTMLOptionsCollection> {
self.options.or_init(|| {
let window = self.owner_window();
HTMLOptionsCollection::new(&window, self, Box::new(OptionsFilter), CanGc::note())
HTMLOptionsCollection::new(
&window,
self,
Box::new(OptionsFilter),
CanGc::deprecated_note(),
)
})
}
@@ -647,7 +652,7 @@ impl HTMLSelectElementMethods<crate::DomTypeHolder> for HTMLSelectElement {
&window,
self.upcast(),
Box::new(SelectedOptionsSource),
CanGc::note(),
CanGc::deprecated_note(),
)
})
}