Style tags added programmatically don't show source in developer tools
Reported by
redrevel...@gmail.com,
Jul 13 2016
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Steps to reproduce the problem: 1. Asynchronously load a simple HTML page from somewhere else which contains an inline style tag with styles. 2. Inject the HTML into a div created by jQuery (not yet on page) 3. Push the div into the page What is the expected behavior? You should see a <style></style> link in the web inspector for the rule from your inline style (in our case it was a * selector which lets you jump straight to the location of the tag on the page. What went wrong? Usually the link won't show up and you won't be able to find the offending style tag without hunting manually through the page. Did this work before? N/A Chrome version: 51.0.2704.103 Channel: stable OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 22.0 r0 We were parsing this via an async call within Angular. The elements are parsed in a jQuery wrapper, and then appended to the document Angular's $compile. I don't think this has anything to do with the fact that the developer tools didn't link its source, but I figured I'd mention it in helping to reproduce and resolve the issue.
,
Jul 13 2016
,
Aug 1 2016
Won't fix due to lack of feedback |
|||
►
Sign in to add a comment |
|||
Comment 1 by pfeldman@chromium.org
, Jul 13 2016Status: Assigned (was: Unconfirmed)
1. go to about:blank 2. evaluate following in console var style = document.createElement("style"); style.textContent = "* { color: red }"; document.head.appendChild(style); 3. inspect body. Things are working as expected. We need more information to figure out why your use case is not working.