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

Unified Diff: Source/devtools/front_end/console/ConsoleView.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/console/ConsoleView.js
diff --git a/Source/devtools/front_end/console/ConsoleView.js b/Source/devtools/front_end/console/ConsoleView.js
index bf087a51c5136bc0897aa928ba8e59f5df92df7d..6c5ebf2c09ab12535b117da51e91772f7dce1a64 100644
--- a/Source/devtools/front_end/console/ConsoleView.js
+++ b/Source/devtools/front_end/console/ConsoleView.js
@@ -88,7 +88,7 @@ WebInspector.ConsoleView = function()
this._viewportThrottler = new WebInspector.Throttler(50);
- this._filterStatusMessageElement = document.createElementWithClass("div", "console-message");
+ this._filterStatusMessageElement = createElementWithClass("div", "console-message");
this._messagesElement.insertBefore(this._filterStatusMessageElement, this._messagesElement.firstChild);
this._filterStatusTextElement = this._filterStatusMessageElement.createChild("span", "console-info");
this._filterStatusMessageElement.createTextChild(" ");
@@ -342,7 +342,7 @@ WebInspector.ConsoleView.prototype = {
if (WebInspector.isWorkerFrontend() && executionContext.target() === WebInspector.targetManager.mainTarget())
return;
- var newOption = document.createElement("option");
+ var newOption = createElement("option");
newOption.__executionContext = executionContext;
newOption.text = this._titleFor(executionContext);
this._optionByExecutionContext.set(executionContext, newOption);
@@ -1154,7 +1154,7 @@ WebInspector.ConsoleCommand.prototype = {
contentElement: function()
{
if (!this._element) {
- this._element = document.createElementWithClass("div", "console-user-command");
+ this._element = createElementWithClass("div", "console-user-command");
this._element.message = this;
this._formatCommand();
@@ -1165,7 +1165,7 @@ WebInspector.ConsoleCommand.prototype = {
_formatCommand: function()
{
- this._formattedCommand = document.createElementWithClass("span", "console-message-text source-code");
+ this._formattedCommand = createElementWithClass("span", "console-message-text source-code");
this._formattedCommand.textContent = this.text;
},
« no previous file with comments | « Source/devtools/front_end/components/TimelineGrid.js ('k') | Source/devtools/front_end/console/ConsoleViewMessage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698