Permalink
Browse files

Merge pull request #3366 from adobe/rlim/remove-dom-agent-warnings

Collect style tags the same way as we collect script tags.
  • Loading branch information...
2 parents 788d855 + ab76867 commit 1a0bd7311f1fb35cb5fa73e62285cdde9dca39bc @gruehle gruehle committed Apr 6, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/LiveDevelopment/Agents/DOMHelpers.js
@@ -129,6 +129,10 @@ define(function DOMHelpersModule(require, exports, module) {
// script tag
to = _find(src.toLowerCase(), "</script>", from + 7);
inc = 9;
+ } else if (src.substr(from, 6).toLowerCase() === "<style") {
+ // style tag
+ to = _find(src.toLowerCase(), "</style>", from + 6);
+ inc = 8;
} else {
to = _find(src, ">", from + 1, true);
inc = 1;
@@ -209,9 +213,9 @@ define(function DOMHelpersModule(require, exports, module) {
payload.closed = true;
}
- // Special handling for script tag since we've already collected
+ // Special handling for script/style tag since we've already collected
// everything up to the end tag.
- if (payload.nodeName === "SCRIPT") {
+ if (payload.nodeName === "SCRIPT" || payload.nodeName === "STYLE") {
payload.closed = true;
}
}

0 comments on commit 1a0bd73

Please sign in to comment.