script: Use &mut JSContext in HTMLMapElement&HTMLImageElement (#43284)

I just want to be part of the campaign.

Testing: It compiles.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Co-authored-by: Sam <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Euclid Ye
2026-03-16 00:02:40 +08:00
committed by GitHub
parent 15b74e04b6
commit c9c8e22abd
3 changed files with 7 additions and 7 deletions

View File

@@ -1937,9 +1937,9 @@ impl HTMLImageElementMethods<crate::DomTypeHolder> for HTMLImageElement {
make_setter!(SetReferrerPolicy, "referrerpolicy");
/// <https://html.spec.whatwg.org/multipage/#dom-img-decode>
fn Decode(&self, can_gc: CanGc) -> Rc<Promise> {
fn Decode(&self, cx: &mut JSContext) -> Rc<Promise> {
// Step 1. Let promise be a new promise.
let promise = Promise::new(&self.global(), can_gc);
let promise = Promise::new2(cx, &self.global());
// Step 2. Queue a microtask to perform the following steps:
let task = ImageElementMicrotask::Decode {