script: Pass &mut JSContext to Element::create (#43348)

Pass `&mut JSContext` to `Element::create` and `create_html_element`

Testing: No functionality changes, covered by existing tests.
Part of #40600

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24
2026-03-17 14:03:33 +01:00
committed by GitHub
parent 3b216f8b99
commit 026d679783
20 changed files with 75 additions and 64 deletions

View File

@@ -255,13 +255,13 @@ impl HTMLOptionElementMethods<crate::DomTypeHolder> for HTMLOptionElement {
selected: bool,
) -> Fallible<DomRoot<HTMLOptionElement>> {
let element = Element::create(
cx,
QualName::new(None, ns!(html), local_name!("option")),
None,
&window.Document(),
ElementCreator::ScriptCreated,
CustomElementCreationMode::Synchronous,
proto,
CanGc::from_cx(cx),
);
let option = DomRoot::downcast::<HTMLOptionElement>(element).unwrap();