I'm searching for a way to compare the available object information in JavaScript. I attempted to copy window.navigator or just window with copy(window); in the chrome console, but encountered errors when trying to convert it to JSON. I need a function that can provide me with a list of all globally available JavaScript variables similar to the functionality of browserspy.dk/showprop.php. Ideally, I would like this list in JSON or another raw text format for easy comparison to understand how browsers can be tracked, specifically in relation to canvas fingerprinting and other JavaScript variables.
My attempts with JSON.stringify(window);
resulted in a circular structure error:
Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at <anonymous>:1:6
Despite researching the error and coming across Chrome sendrequest error: TypeError: Converting circular structure to JSON, I continued to face other errors when implementing the suggested solutions. I am open to missing data in the object as long as I can compare the different variables. Unfortunately, the methods I have tried online either throw errors or ignore the objects entirely. My goal is to obtain all the information within window.navigator or window.navigator.webkitGetUserMedia, including its sub-values like window.navigator.webkitGetUserMedia.length. How can I achieve this?