script: Pass &mut JSContext to DOM apis that call Element::create (#43108)

Testing: No behaviour change, a successful build is enough.
Part of #40600

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24
2026-03-09 11:07:13 +01:00
committed by GitHub
parent c32d9f51af
commit fa86bbedbe
13 changed files with 154 additions and 99 deletions

View File

@@ -573,8 +573,8 @@ impl HTMLSelectElementMethods<crate::DomTypeHolder> for HTMLSelectElement {
}
/// <https://html.spec.whatwg.org/multipage/#dom-select-length>
fn SetLength(&self, length: u32, can_gc: CanGc) {
self.Options().SetLength(length, can_gc)
fn SetLength(&self, cx: &mut JSContext, length: u32) {
self.Options().SetLength(cx, length)
}
/// <https://html.spec.whatwg.org/multipage/#dom-select-item>
@@ -590,11 +590,11 @@ impl HTMLSelectElementMethods<crate::DomTypeHolder> for HTMLSelectElement {
/// <https://html.spec.whatwg.org/multipage/#dom-select-setter>
fn IndexedSetter(
&self,
cx: &mut JSContext,
index: u32,
value: Option<&HTMLOptionElement>,
can_gc: CanGc,
) -> ErrorResult {
self.Options().IndexedSetter(index, value, can_gc)
self.Options().IndexedSetter(cx, index, value)
}
/// <https://html.spec.whatwg.org/multipage/#dom-select-nameditem>