mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user