mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +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:
@@ -2813,13 +2813,13 @@ impl HTMLMediaElement {
|
||||
let shadow_root = self.upcast::<Element>().attach_ua_shadow_root(cx, false);
|
||||
let document = self.owner_document();
|
||||
let script = Element::create(
|
||||
cx,
|
||||
QualName::new(None, ns!(html), local_name!("script")),
|
||||
None,
|
||||
&document,
|
||||
ElementCreator::ScriptCreated,
|
||||
CustomElementCreationMode::Asynchronous,
|
||||
None,
|
||||
CanGc::from_cx(cx),
|
||||
);
|
||||
// This is our hacky way to temporarily workaround the lack of a privileged
|
||||
// JS context.
|
||||
@@ -2842,13 +2842,13 @@ impl HTMLMediaElement {
|
||||
}
|
||||
|
||||
let style = Element::create(
|
||||
cx,
|
||||
QualName::new(None, ns!(html), local_name!("style")),
|
||||
None,
|
||||
&document,
|
||||
ElementCreator::ScriptCreated,
|
||||
CustomElementCreationMode::Asynchronous,
|
||||
None,
|
||||
CanGc::from_cx(cx),
|
||||
);
|
||||
|
||||
style
|
||||
|
||||
Reference in New Issue
Block a user