[css-houdini-drafts] [css-typed-om] structuredClone for typed-om objects (#1101)

DevSDK has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-typed-om] structuredClone for typed-om objects ==
"`structuredClone` is not supported for CSSUnitValue"  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:

```js
structuredClone(CSS.px(2))
```

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/#simple-numeric
[3] https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1101 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 9 July 2023 12:03:27 UTC