Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions webapi/intersection_observer_callback_callback.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ pub fn IntersectionObserverCallback::new(

///|
#cfg(target="js")
extern "js" fn intersection_observer_callback_ffi(
callback : (Array[IntersectionObserverEntry], IntersectionObserver) -> Unit,
extern "js" fn intersection_observer_callback_ffi_fixed(
callback : (FixedArray[IntersectionObserverEntry], IntersectionObserver) -> Unit,
) -> IntersectionObserverCallback = "(callback) => callback"

fn intersection_observer_callback_ffi(
callback : (Array[IntersectionObserverEntry], IntersectionObserver) -> Unit,
) -> IntersectionObserverCallback {
intersection_observer_callback_ffi_fixed(fn(__a1, __a2) { callback(Array::from_fixed_array(__a1), __a2) })
}

///|
#cfg(target="wasm-gc")
fn intersection_observer_callback_ffi_raw(
Expand Down
10 changes: 8 additions & 2 deletions webapi/mutation_callback_callback.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ pub fn MutationCallback::new(

///|
#cfg(target="js")
extern "js" fn mutation_callback_ffi(
callback : (Array[MutationRecord], MutationObserver) -> Unit,
extern "js" fn mutation_callback_ffi_fixed(
callback : (FixedArray[MutationRecord], MutationObserver) -> Unit,
) -> MutationCallback = "(callback) => callback"

fn mutation_callback_ffi(
callback : (Array[MutationRecord], MutationObserver) -> Unit,
) -> MutationCallback {
mutation_callback_ffi_fixed(fn(__a1, __a2) { callback(Array::from_fixed_array(__a1), __a2) })
}

///|
#cfg(target="wasm-gc")
fn mutation_callback_ffi_raw(
Expand Down
10 changes: 8 additions & 2 deletions webapi/resize_observer_callback_callback.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ pub fn ResizeObserverCallback::new(

///|
#cfg(target="js")
extern "js" fn resize_observer_callback_ffi(
callback : (Array[ResizeObserverEntry], ResizeObserver) -> Unit,
extern "js" fn resize_observer_callback_ffi_fixed(
callback : (FixedArray[ResizeObserverEntry], ResizeObserver) -> Unit,
) -> ResizeObserverCallback = "(callback) => callback"

fn resize_observer_callback_ffi(
callback : (Array[ResizeObserverEntry], ResizeObserver) -> Unit,
) -> ResizeObserverCallback {
resize_observer_callback_ffi_fixed(fn(__a1, __a2) { callback(Array::from_fixed_array(__a1), __a2) })
}

///|
#cfg(target="wasm-gc")
fn resize_observer_callback_ffi_raw(
Expand Down