Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1645)

Unified Diff: Source/devtools/front_end/audits/AuditFormatters.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/audits/AuditLauncherView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/audits/AuditFormatters.js
diff --git a/Source/devtools/front_end/audits/AuditFormatters.js b/Source/devtools/front_end/audits/AuditFormatters.js
index e24ccce83c38955753d0414d46097ef034a6943b..9b42613d1595e1a13d846bca719dcf062fd0c1c2 100644
--- a/Source/devtools/front_end/audits/AuditFormatters.js
+++ b/Source/devtools/front_end/audits/AuditFormatters.js
@@ -43,7 +43,7 @@ WebInspector.AuditFormatters.Registry = {
*/
text: function(text)
{
- return document.createTextNode(text);
+ return createTextNode(text);
},
/**
@@ -52,7 +52,7 @@ WebInspector.AuditFormatters.Registry = {
*/
snippet: function(snippetText)
{
- var div = document.createElement("div");
+ var div = createElement("div");
div.textContent = snippetText;
div.className = "source-code";
return div;
@@ -63,7 +63,7 @@ WebInspector.AuditFormatters.Registry = {
*/
concat: function()
{
- var parent = document.createElement("span");
+ var parent = createElement("span");
for (var arg = 0; arg < arguments.length; ++arg)
parent.appendChild(WebInspector.auditFormatters.apply(arguments[arg]));
return parent;
@@ -77,7 +77,7 @@ WebInspector.AuditFormatters.Registry = {
*/
url: function(url, displayText, allowExternalNavigation)
{
- var a = document.createElement("a");
+ var a = createElement("a");
a.href = sanitizeHref(url);
a.title = url;
a.textContent = displayText || url;
« no previous file with comments | « no previous file | Source/devtools/front_end/audits/AuditLauncherView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698