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
For the JSON viewer, window.getSelection() only returns what is in the user's viewport if a whole JSON document is selected. This is causing problems for our browser extension.
I understand that browser extensions do not have access to the page's JS code so even if window.getSelection() were to be overridden, extensions would not have access.
Copy + paste still works fine if performed by the user, so I'm assuming there is already some interception/override of selection APIs.
AB#51282586
The text was updated successfully, but these errors were encountered:
I think the reason for this is that the JSON viewer is using a web editor JS-based library to render the JSON content. This library optimizes for speed by only rendering to the DOM what can fit in the viewport. Copy/Paste probably works thanks to the library too.
But I'm afraid getting the JSON by querying the DOM won't work, because the content is just not there entirely.
We have already received a request to expose the entire JSON data to the page context. So, for example, you could do window.jsonData and get the entire JSON object. I guess this would help you in your case.
Unfortunately, we've not yet prioritized working on this.
JSON Viewer has been deprecated and removed from Microsoft Edge. We just found too many incompatibilities with expected web platform behavior, and do not have the capacity to make it as great as we believe it could be. In the meantime, there are many extensions which support JSON formatting, or you can use DevTools to inspect JSON data in a formatted way.
For the JSON viewer, window.getSelection() only returns what is in the user's viewport if a whole JSON document is selected. This is causing problems for our browser extension.
I understand that browser extensions do not have access to the page's JS code so even if window.getSelection() were to be overridden, extensions would not have access.
Copy + paste still works fine if performed by the user, so I'm assuming there is already some interception/override of selection APIs.
AB#51282586
The text was updated successfully, but these errors were encountered: