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
When I directly call the setJson method on the current page to pass json parameters, the tree view can expand and display normally.
But when I called setJson on the parent page by obtaining the window object, the text view was normal, and the tree view only displayed [object object] without automatic expansion or even manual expansion.
But if I call setJson on the parent page and pass the text parameter, the tree can expand and display normally
The text was updated successfully, but these errors were encountered:
Thanks for the demo code, I can indeed reproduce your issue. The cause here is that a JavaScript object created in the main thread is to be used in an iframe. That is a different JavaScript realm. The editor checks whether the input is an Object by checking value.constructor === Object, but that is false when the value is created in a different JavaScript realm. I'll make the function less strict to fix this issue.
When I directly call the
setJson
method on the current page to passjson
parameters, thetree view
can expand and display normally.But when I called
setJson
on the parent page by obtaining the window object, thetext view
was normal, and thetree view
only displayed[object object]
without automatic expansion or even manual expansion.But if I call
setJson
on the parent page and pass thetext
parameter, the tree can expand and display normallyThe text was updated successfully, but these errors were encountered: