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
@zag-js/core use klona/full as structuredClone, but it uses __proto__ property which is not implemented in deno. It leads to some components not works with deno.
Replace __proto__ with Object.getPrototypeOf can be able to solve the problem.
🧱 Problem Statement / Justification
Please provide valid reason(s) why this should added
Some framework like remix can run on the deno and deno's framework fresh use preact, , so I think it would be beneficial to support deno.
🚀 Feature request
@zag-js/core
useklona/full
as structuredClone, but it uses__proto__
property which is not implemented indeno
. It leads to some components not works with deno.Replace
__proto__
withObject.getPrototypeOf
can be able to solve the problem.🧱 Problem Statement / Justification
Some framework like remix can run on the deno and deno's framework fresh use preact, , so I think it would be beneficial to support deno.
Object.getPrototypeOf has same behavior as
__proto__
and good compatibility.✅ Proposed solution or API
klona/full
has following code. In my local test, replacingx.__proto__
withObject.getPrototypeOf(x)
is enough.↩️ Alternatives
contribute to klona
📝 Additional Information
Some components like select has api(Collection) written in es6 class,
klona
can't clone it when running on deno because of__proto__
.The text was updated successfully, but these errors were encountered: