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

Unified Diff: Source/devtools/front_end/audits/AuditLauncherView.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
Index: Source/devtools/front_end/audits/AuditLauncherView.js
diff --git a/Source/devtools/front_end/audits/AuditLauncherView.js b/Source/devtools/front_end/audits/AuditLauncherView.js
index d400f709ff8a89a2123fdd24d22e5abc38e3d396..ff5e87bf053cf4286328158d01e7412c5c63713b 100644
--- a/Source/devtools/front_end/audits/AuditLauncherView.js
+++ b/Source/devtools/front_end/audits/AuditLauncherView.js
@@ -46,7 +46,7 @@ WebInspector.AuditLauncherView = function(auditController)
this.element.classList.add("audit-launcher-view");
this.element.classList.add("panel-enabler-view");
- this._contentElement = document.createElement("div");
+ this._contentElement = createElement("div");
this._contentElement.className = "audit-launcher-view-content";
this.element.appendChild(this._contentElement);
this._boundCategoryClickListener = this._categoryClicked.bind(this);
@@ -55,7 +55,7 @@ WebInspector.AuditLauncherView = function(auditController)
this._sortedCategories = [];
- this._headerElement = document.createElement("h1");
+ this._headerElement = createElement("h1");
this._headerElement.className = "no-audits";
this._headerElement.textContent = WebInspector.UIString("No audits to run");
this._contentElement.appendChild(this._headerElement);
@@ -228,10 +228,10 @@ WebInspector.AuditLauncherView.prototype = {
*/
_createCategoryElement: function(title, id)
{
- var labelElement = document.createElement("label");
+ var labelElement = createElement("label");
labelElement.id = this._categoryIdPrefix + id;
- var element = document.createElement("input");
+ var element = createElement("input");
element.type = "checkbox";
if (id !== "")
element.addEventListener("click", this._boundCategoryClickListener, false);
@@ -244,7 +244,7 @@ WebInspector.AuditLauncherView.prototype = {
_createLauncherUI: function()
{
- this._headerElement = document.createElement("h1");
+ this._headerElement = createElement("h1");
this._headerElement.textContent = WebInspector.UIString("Select audits to run");
for (var child = 0; child < this._contentElement.children.length; ++child)
@@ -279,7 +279,7 @@ WebInspector.AuditLauncherView.prototype = {
this._auditPresentStateElement.name = "audit-mode";
this._auditPresentStateElement.type = "radio";
this._auditPresentStateElement.checked = true;
- this._auditPresentStateLabelElement = document.createTextNode(WebInspector.UIString("Audit Present State"));
+ this._auditPresentStateLabelElement = createTextNode(WebInspector.UIString("Audit Present State"));
labelElement.appendChild(this._auditPresentStateLabelElement);
labelElement = this._buttonContainerElement.createChild("label");
« no previous file with comments | « Source/devtools/front_end/audits/AuditFormatters.js ('k') | Source/devtools/front_end/audits/AuditResultView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698