|
5 | 5 |
|
6 | 6 | ### Added |
7 | 7 |
|
8 | | -* Added stable `ShowPopoverOptions` dictionary and `show_popover_with_options()` method to |
9 | | - `HtmlElement`, and unstable `TogglePopoverOptions` dictionary per the WHATWG HTML spec. |
10 | | - [#4968](https://github.com/wasm-bindgen/wasm-bindgen/pull/4968) |
| 8 | +### Changed |
11 | 9 |
|
12 | | -* Added unstable Geolocation API types per the latest W3C spec: `GeolocationCoordinates`, |
13 | | - `GeolocationPosition`, and `GeolocationPositionError`. The `Geolocation` interface now |
14 | | - has both stable methods (using the old `Position`/`PositionError` types with `[Throws]`) |
15 | | - and unstable methods (using the new types without `[Throws]}`, matching actual browser behavior). |
16 | | - [#2578](https://github.com/AbesBend662/AbesBend662.github.io/pull/2578) |
| 10 | +### Fixed |
17 | 11 |
|
18 | | -* Added `matrixTransform()` method to `DOMPointReadOnly` in `web-sys`. |
19 | | - [#4962](https://github.com/wasm-bindgen/wasm-bindgen/pull/4962) |
| 12 | +### Removed |
| 13 | + |
| 14 | +## [0.2.109](https://github.com/wasm-bindgen/wasm-bindgen/compare/0.2.108...0.2.109) |
| 15 | + |
| 16 | +### Added |
20 | 17 |
|
21 | 18 | * Added support for erasable generic type parameters on imported JavaScript types, |
22 | 19 | using sound type erasure in JS bindgen boundary. Includes updated js-sys bindings |
23 | 20 | with generic implementations for many standard JS types and functions including |
24 | 21 | `Array<T>`, `Promise<T>`, `Map<K, V>`, `Iterator<T>`, and more. |
25 | 22 | [#4876](https://github.com/wasm-bindgen/wasm-bindgen/pull/4876) |
26 | 23 |
|
27 | | -* Implement `#[wasm_bindgen(catch)]` exception handling directly in Wasm using |
28 | | - `WebAssembly.JSTag` when Wasm exception handling is available. This generates |
29 | | - smaller and faster code by avoiding JavaScript `handleError` wrapper functions. |
30 | | - [#4942](https://github.com/wasm-bindgen/wasm-bindgen/pull/4942) |
| 24 | +* Added `ScopedClosure<'a, T>` as a unified closure type with lifetime parameter. `ScopedClosure::borrow(&f)` (for immutable `Fn`) and `ScopedClosure::borrow_mut(&mut f)` (for mutable `FnMut`) create borrowed closures that can capture non-`'static` references, ideal for immediate/synchronous JS callbacks. `Closure<T>` is now a type alias for `ScopedClosure<'static, T>`, maintaining backwards compatibility. Also added `IntoWasmAbi` implementation for `Closure<T>` enabling pass-by-value ownership transfer to JavaScript. |
31 | 25 |
|
32 | 26 | * Added `ImmediateClosure<'a, T>` as a lightweight, unwind-safe replacement for |
33 | 27 | `&dyn FnMut` in immediate/synchronous callbacks. Unlike `ScopedClosure`, it has |
|
38 | 32 | Also implements `From<&ImmediateClosure<T>> for ScopedClosure<T>` for API migration. |
39 | 33 | [#4950](https://github.com/wasm-bindgen/wasm-bindgen/issues/4950) |
40 | 34 |
|
41 | | -* Added `ScopedClosure<'a, T>` as a unified closure type with lifetime parameter. `ScopedClosure::borrow(&f)` (for immutable `Fn`) and `ScopedClosure::borrow_mut(&mut f)` (for mutable `FnMut`) create borrowed closures that can capture non-`'static` references, ideal for immediate/synchronous JS callbacks. `Closure<T>` is now a type alias for `ScopedClosure<'static, T>`, maintaining backwards compatibility. Also added `IntoWasmAbi` implementation for `Closure<T>` enabling pass-by-value ownership transfer to JavaScript. |
| 35 | +* Implement `#[wasm_bindgen(catch)]` exception handling directly in Wasm using |
| 36 | + `WebAssembly.JSTag` when Wasm exception handling is available. This generates |
| 37 | + smaller and faster code by avoiding JavaScript `handleError` wrapper functions. |
| 38 | + [#4942](https://github.com/wasm-bindgen/wasm-bindgen/pull/4942) |
42 | 39 |
|
43 | 40 | * Add Node.js `worker_threads` support for atomics builds. When targeting Node.js with atomics enabled, wasm-bindgen now generates `initSync({ module, memory, thread_stack_size })` and `__wbg_get_imports(memory)` functions that allow worker threads to initialize with a shared WebAssembly.Memory and pre-compiled module. Auto-initialization occurs only on the main thread for backwards compatibility. |
44 | 41 |
|
45 | | -* Added the `web` and `node` targets to the `--experimental-reset-state-function` flag. |
46 | | - [#4909](https://github.com/wasm-bindgen/wasm-bindgen/pull/4909) |
| 42 | +* Added a panic message when a getter has more than one argument. |
| 43 | + [#4936](https://github.com/wasm-bindgen/wasm-bindgen/pull/4936) |
47 | 44 |
|
48 | 45 | * Added support for WebIDL namespace attributes in `wasm-bindgen-webidl`. This enables |
49 | 46 | APIs like the CSS Custom Highlight API which adds the `highlights` attribute to the `CSS` namespace. |
50 | 47 | [#4930](https://github.com/wasm-bindgen/wasm-bindgen/issues/4930) |
51 | 48 |
|
| 49 | +* Added stable `ShowPopoverOptions` dictionary and `show_popover_with_options()` method to |
| 50 | + `HtmlElement`, and unstable `TogglePopoverOptions` dictionary per the WHATWG HTML spec. |
| 51 | + [#4968](https://github.com/wasm-bindgen/wasm-bindgen/pull/4968) |
| 52 | + |
| 53 | +* Added unstable Geolocation API types per the latest W3C spec: `GeolocationCoordinates`, |
| 54 | + `GeolocationPosition`, and `GeolocationPositionError`. The `Geolocation` interface now |
| 55 | + has both stable methods (using the old `Position`/`PositionError` types with `[Throws]`) |
| 56 | + and unstable methods (using the new types without `[Throws]}`, matching actual browser behavior). |
| 57 | + [#2578](https://github.com/AbesBend662/AbesBend662.github.io/pull/2578) |
| 58 | + |
| 59 | +* Added `matrixTransform()` method to `DOMPointReadOnly` in `web-sys`. |
| 60 | + [#4962](https://github.com/wasm-bindgen/wasm-bindgen/pull/4962) |
| 61 | + |
| 62 | +* Added the `web` and `node` targets to the `--experimental-reset-state-function` flag. |
| 63 | + [#4909](https://github.com/wasm-bindgen/wasm-bindgen/pull/4909) |
| 64 | + |
52 | 65 | * Added `oncancel` event handler to `GlobalEventHandlers` (available on `HtmlElement`, |
53 | 66 | `Document`, `Window`, etc.). |
54 | 67 | [#4542](https://github.com/wasm-bindgen/wasm-bindgen/pull/4542) |
|
82 | 95 | stable methods to have unstable overloads. |
83 | 96 | [#4928](https://github.com/wasm-bindgen/wasm-bindgen/issues/4928) |
84 | 97 |
|
85 | | -* Added a panic message when a getter as more than one argument. |
86 | | - [#4936](https://github.com/wasm-bindgen/wasm-bindgen/pull/4936) |
87 | | - |
88 | 98 | * Updated WebGPU bindings to the February 2026 spec. Dictionary fields with union |
89 | 99 | types now generate multiple type-safe setters (e.g. `set_resource_gpu_sampler()`, |
90 | 100 | `set_resource_gpu_texture_view()`) alongside a deprecated fallback setter. Sequence |
|
103 | 113 |
|
104 | 114 | ### Changed |
105 | 115 |
|
| 116 | +* Increased externref stack size from 128 to 1024 slots to prevent "table index is out of bounds" |
| 117 | + errors in applications with deep call stacks or many concurrent async operations. |
| 118 | + [#4951](https://github.com/wasm-bindgen/wasm-bindgen/pull/4951) |
| 119 | + |
106 | 120 | * `Closure::new()`, `Closure::once()`, and related methods now require `UnwindSafe` bounds on closures when building with `panic=unwind`. New `_aborting` variants (`new_aborting()`, `once_aborting()`, etc.) are provided for closures that don't need panic catching and want to avoid the `UnwindSafe` requirement. |
107 | 121 | [#4893](https://github.com/wasm-bindgen/wasm-bindgen/pull/4893) |
108 | 122 |
|
|
114 | 128 |
|
115 | 129 | ### Fixed |
116 | 130 |
|
| 131 | +* Fixed incorrect JS export names when LLVM merges identical functions at `opt-level >= 2`. |
| 132 | + [#4946](https://github.com/wasm-bindgen/wasm-bindgen/issues/4946) |
| 133 | + |
| 134 | +* Fixed incorrect `Closure` adapter deduplication when wasm-ld's Identical Code Folding merges |
| 135 | + invoke functions for different closure types into the same export. |
| 136 | + [#4953](https://github.com/wasm-bindgen/wasm-bindgen/issues/4953) |
| 137 | + |
| 138 | +* Fixed `ReferenceError` when using Rust struct names that conflict with JS builtins (e.g., `Array`). |
| 139 | + The constructor now correctly uses the aliased `FinalizationRegistry` identifier. |
| 140 | + [#4932](https://github.com/wasm-bindgen/wasm-bindgen/pull/4932) |
| 141 | + |
117 | 142 | * Fixed `Element::scroll_top()`, `Element::scroll_left()`, and `HtmlElement::scroll_top()` |
118 | 143 | to return `f64` instead of `i32` per the CSSOM View spec, behind `web_sys_unstable_apis`. |
119 | 144 | The stable API is unchanged for backwards compatibility. |
120 | 145 | [#4525](https://github.com/wasm-bindgen/wasm-bindgen/issues/4525) |
121 | 146 |
|
122 | | -* Fixed incorrect JS export names when LLVM merges identical functions at `opt-level >= 2`. |
123 | | - [#4946](https://github.com/wasm-bindgen/wasm-bindgen/issues/4946) |
124 | | - |
125 | 147 | * Added spec-compliant `i32` parameter types for `CanvasRenderingContext2d::get_image_data()` |
126 | 148 | and `put_image_data()` (and `OffscreenCanvasRenderingContext2d` equivalents) behind |
127 | 149 | `web_sys_unstable_apis`. Per the HTML spec, `getImageData` and `putImageData` use `long` |
|
141 | 163 | types from the W3C Image Capture spec. |
142 | 164 | [#4964](https://github.com/wasm-bindgen/wasm-bindgen/pull/4964) |
143 | 165 |
|
144 | | -* Increased externref stack size from 128 to 1024 slots to prevent "table index is out of bounds" |
145 | | - errors in applications with deep call stacks or many concurrent async operations. |
146 | | - [#4951](https://github.com/wasm-bindgen/wasm-bindgen/pull/4951) |
147 | | - |
148 | | -* Fixed incorrect `Closure` adapter deduplication when wasm-ld's Identical Code Folding merges |
149 | | - invoke functions for different closure types into the same export. |
150 | | - [#4953](https://github.com/wasm-bindgen/wasm-bindgen/issues/4953) |
151 | | - |
152 | | -* Fixed `ReferenceError` when using Rust struct names that conflict with JS builtins (e.g., `Array`). |
153 | | - The constructor now correctly uses the aliased `FinalizationRegistry` identifier. |
154 | | - [#4932](https://github.com/wasm-bindgen/wasm-bindgen/pull/4932) |
155 | | - |
156 | 166 | * Fixed `unfulfilled_lint_expectations` warnings when using `#[expect(...)]` attributes |
157 | 167 | on functions annotated with `#[wasm_bindgen]`. The `#[expect]` attributes are now |
158 | 168 | converted to `#[allow]` in generated code to prevent spurious warnings. |
|
0 commit comments