mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
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:
@@ -1747,9 +1747,9 @@ fn parse_a_sizes_attribute(value: &str) -> SourceSizeList {
|
||||
impl HTMLImageElementMethods<crate::DomTypeHolder> for HTMLImageElement {
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-image>
|
||||
fn Image(
|
||||
cx: &mut JSContext,
|
||||
window: &Window,
|
||||
proto: Option<HandleObject>,
|
||||
can_gc: CanGc,
|
||||
width: Option<u32>,
|
||||
height: Option<u32>,
|
||||
) -> Fallible<DomRoot<HTMLImageElement>> {
|
||||
@@ -1765,7 +1765,7 @@ impl HTMLImageElementMethods<crate::DomTypeHolder> for HTMLImageElement {
|
||||
ElementCreator::ScriptCreated,
|
||||
CustomElementCreationMode::Synchronous,
|
||||
proto,
|
||||
can_gc,
|
||||
CanGc::from_cx(cx),
|
||||
);
|
||||
|
||||
let image = DomRoot::downcast::<HTMLImageElement>(element).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user