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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js

Issue 2693193006: DevTools: Show docs link on empty manifest landing page (Closed)
Patch Set: just set textContent on change. Created 3 years, 10 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: third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js b/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
index 94bde9264dcb20808450c9ca5ee0ca292925bb3a..8b140636b65cf148ae6aad2747d3172e4e5505e4 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
@@ -32,24 +32,28 @@
* @unrestricted
*/
UI.EmptyWidget = class extends UI.VBox {
+ /**
+ * @param {string} text
+ */
constructor(text) {
super();
this.registerRequiredCSS('ui/emptyWidget.css');
this.element.classList.add('empty-view');
- this.textElement = this.element.createChild('span');
- this._text = text;
+ this.textElement = this.element.createChild('h2');
+ this.textElement.textContent = text;
}
/**
- * @override
+ * @return {!Element}
*/
- wasShown() {
- this.textElement.textContent = this._text;
+ appendParagraph() {
+ return this.element.createChild('p');
}
+ /**
+ * @param {string} text
+ */
set text(text) {
- this._text = text;
- if (this.isShowing())
- this.textElement.textContent = this._text;
+ this.textElement.textContent = text;
}
};

Powered by Google App Engine
This is Rietveld 408576698