3 ms·
> When you choose “Inspect element” or otherwise bring up one your browser’s DOM inspector, what you’re looking at is the document tree after the browser has ap
by pavel_lishin 16y ago
> When you choose “Inspect element” or otherwise bring up one your browser’s DOM inspector, what you’re looking at is the document tree after the browser has applied its error correction and after any JavaScripts have manipulated the DOM.
Isn't this fairly obvious?
Being unable to inspect elements after you've fiddled with them via javascript would eliminate about 99% of the usefuless...
- jrmxrf 16y agoalso, what I have learned the hard way is that view source in FF is not exact source and is actually after some error correction I trust only wget
- martey 16y agoI think the article was making the point that someone debugging a HTML page would do well to look at both "Inspect Element" and "View Source," as there might be errors only visible in the latter. For example, a few weeks ago, I was testing a website. It worked fine in Firefox, Chrome, and Safari, but broke horribly in Internet Explorer. A look at the source made me realize that a syntax error in my templates was causing the first few lines of the source (including <html><head>, etc.) to render. The other browsers all ignored this.
- mikeryan 16y agoI can't, of course, speak to your issue directly but the chrome/webkit debugger usually shows these errors in the console?
- joshuacc 16y agoIt is obvious if you think about it, but often overlooked by developers attempting to debug websites.
- pavel_lishin 16y agoTrue, I suppose. I work with AJAX and the DOM quite a bit, so as soon as I started using Firebug to debug that stuff, it became pretty obvious that it's showing me the DOM as it is, not as it was.