Ran into this while checking structured clone support.
const view = new DataView(new ArrayBuffer(4));
structuredClone(view);
Current result:
TypeError: Data views are not supported yet.
This comes from core/runtime/src/store/from.rs, and it affects both structuredClone() and postMessage() since both go through JsValueStore::try_from_js(...).
This also looks like unfinished support rather than an intentional gap:
JsValueStore already has a ValueStoreInner::DataView variant in core/runtime/src/store/mod.rs
core/runtime/src/store/to.rs already has a DataView reconstruction path
There is direct WPT coverage for cloning DataView values in:
tests_wpt/html/webappapis/structured-clone/structured-clone-battery-of-tests.js
tests_wpt/html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.js
So the main issue here is just that Boa rejects DataView values outright right now.
Ran into this while checking structured clone support.
Current result:
This comes from
core/runtime/src/store/from.rs, and it affects bothstructuredClone()andpostMessage()since both go throughJsValueStore::try_from_js(...).This also looks like unfinished support rather than an intentional gap:
JsValueStorealready has aValueStoreInner::DataViewvariant incore/runtime/src/store/mod.rscore/runtime/src/store/to.rsalready has aDataViewreconstruction pathThere is direct WPT coverage for cloning
DataViewvalues in:tests_wpt/html/webappapis/structured-clone/structured-clone-battery-of-tests.jstests_wpt/html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.jsSo the main issue here is just that Boa rejects
DataViewvalues outright right now.