Give [[Clone]] hook to InternalStructuredClone?
Closed this issue · 4 comments
annevk commented
It seems it does not necessarily need memory as argument, but needs to be able to recursively invoke InternalStructuredClone. We could give it some kind of hook that already has memory and targetRealm preset.
dslomov commented
What is the use case? (Which "implementation" of [[Clone]] needs to recurse?)
annevk commented
It seems bad not to provide the hooks to do the same we do ourselves. But also, ImageData.
dslomov commented
Agreed with need for hooks, I just wanted a use case to validate the hooks :)
annevk commented
Since [[Clone]] is an internal algorithm, it has access to InternalStructuredClone already. (Perhaps if this becomes an API at some point we'd need a real hook, but also a design that's a lot more complicated.)