You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"structuredClone can’t deal with CSSUnitValue objects" issue is filed on crbug [1].
Currently, the css-typed-om spec[2] does not mark the [Serializable] attribute for typed-om objects.
Consequently, these objects are not contained in the platform objects that can be serializable according to the HTML spec [3].
So the browsers comply with that spec that throws an exception.
However, the following codes look very natural:
Given this, browsers appropriately throw an exception to comply with the spec.
However, consider the following code:
structuredClone(CSS.px(2))
This looks quite intuitive and straightforward.
If there is no extra context that I missed, could we consider supporting it?
"
structuredClone
can’t deal with CSSUnitValue objects" issue is filed on crbug [1].Currently, the css-typed-om spec[2] does not mark the [Serializable] attribute for typed-om objects.
Consequently, these objects are not contained in the platform objects that can be serializable according to the HTML spec [3].
So the browsers comply with that spec that throws an exception.
However, the following codes look very natural:
Given this, browsers appropriately throw an exception to comply with the spec.
However, consider the following code:
This looks quite intuitive and straightforward.
If there is no extra context that I missed, could we consider supporting it?
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1444708&q=is%3Astarred&can=2
[2] https://www.w3.org/TR/css-typed-om-1/#cssunitvalue
[3] https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects
The text was updated successfully, but these errors were encountered: