SourceView in Resources is weird when there is an EOF right after a style or script element. <style> a {} </style> is shown as <style> a {} </style> a {} </style>
Seems to go wrong here. http://trac.webkit.org/browser/trunk/WebCore/html/HTMLTokenizer.cpp#L1565
Same happens to: BEGIN ================================ <script> function testAPI() { var resultStr = ""; var toolstrips = chrome.extension.getToolstrips(); resultStr += "toolstrips count: " + toolstrips.length; var reportWin = window.open("result.html", "reportWin"); var resultDiv = reportWin.document.getElementById("result"); resultDiv.innerHTML = resultStr; } </script> END ================================== but when i remove the last function line and make it BEGIN ================================ <script> function testAPI() { var resultStr = ""; var toolstrips = chrome.extension.getToolstrips(); resultStr += "toolstrips count: " + toolstrips.length; var reportWin = window.open("result.html", "reportWin"); var resultDiv = reportWin.document.getElementById("result"); } </script> END ================================== It shows up right. So it is not the EOF that triggers it - it could be something different.