-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
I just merged #134, which adds a new web handle type based on references to a JsValue. I opted to merge it now so we can migrate bikeshedding to a new thread.
Three strategies were proposed of having wasm-bindgen-based handles without using the data attribute ID hack:
- Storing the internal
idxu32field that theJsValueis a wrapper around. While this approach is dependency free and compatible with the current WASM ABI, concerns were voiced that the new API introduced too many footguns, especially for smaller-scale use cases. - Storing the
JsValueinline. This adds an optional dependency onwasm-bindgenand makes it so window handles can no longer beCopy. - Current: Store a pointer that is said to point to a
JsValuethrough a reference. This, again, requires an optional dependency onwasm-bindgen, but makes the handlesCopy.
Which strategy should we use to store web handles?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels