I am troubleshooting a script.
How do I save the orange output from the display above?
Any suggestions?
Thanks.
I am troubleshooting a script.
How do I save the orange output from the display above?
Any suggestions?
Thanks.
There probably is a better way, but I use
right-click > Copy > Outer HTML
Then paste somewhere.
Thanks for the response.
Are you referring to copying just html?
I am troubleshooting a scrolling script.
The data (in orange) I am referring to is a continual stream of data containing display, visibility, padding and other properties as it scrolls down the page.
I want to capture all of it.
Oh.
Have you already tried logging it to the console or otherwise accumulating it somewhere as you are changing it? Or you could add a mutation observer on the element, but that probably involves more overhead.
I could only find ways to log errors or information.
Information sounds useful.
Is your script setting the position? If so, can you emit the data to the console using console.log() from that same part of your script?
Can you tell me how to do that?
I don’t know what your code looks like, but let’s say there is a block of code where you set position data. Then you could
console.log(document.getElementById(‘header’).getAttribute(‘style’));
to output the stuff highlighted in orange to the console. It might be a tiny bit faster to output data the script already has instead of having to go to the DOM, but it probably would be a little bit more work to code it up.
I will give it a try. Thanks!!