We're updating the issue view to help you get more done. 

IEncodeClojure only works on same-context Objects

Description

The default impl uses (identical? (type x) js/Object), but objects created in another JS context (e.g. another frame) will fail this test, since their constructor is a different js/Object. Thus js->clj is the identity on such objects.

I wonder if there are any related problems anywhere else, e.g. with protocols? This seems to be the only occurrence of js/Object.

Maybe this can be fixed by extending IEncodeClojure to object? I don't immediately see how to do that without incurring the option destructuring overhead recursively.

Environment

None

Status

Assignee

Unassigned

Reporter

Tom Jack

Labels

None

Approval

None

Patch

None

Priority

Minor