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

Unified Diff: Source/devtools/front_end/DOMModel.js

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/DOMModel.js
diff --git a/Source/devtools/front_end/DOMModel.js b/Source/devtools/front_end/DOMModel.js
index e934b9d43f8eb9827ba2a13a3bcba52d7801c378..1002ca4ddb68cd47e34c1b88724825d8bf02cb02 100644
--- a/Source/devtools/front_end/DOMModel.js
+++ b/Source/devtools/front_end/DOMModel.js
@@ -136,6 +136,14 @@ WebInspector.DOMNode.ShadowRootTypes = {
WebInspector.DOMNode.prototype = {
/**
+ * @return {!WebInspector.DOMModel}
+ */
+ domModel: function()
+ {
+ return this._domModel;
+ },
+
+ /**
* @return {?Array.<!WebInspector.DOMNode>}
*/
children: function()
@@ -784,6 +792,25 @@ WebInspector.DOMNode.prototype = {
return null;
},
+ /**
+ * @param {string=} mode
+ * @param {!RuntimeAgent.RemoteObjectId=} objectId
+ */
+ highlight: function(mode, objectId)
+ {
+ this._domModel.highlightDOMNode(this.id, mode, objectId);
+ },
+
+ highlightForTwoSeconds: function()
+ {
+ this._domModel.highlightDOMNodeForTwoSeconds(this.id);
+ },
+
+ reveal: function()
+ {
+ WebInspector.Revealer.reveal(this);
+ },
+
__proto__: WebInspector.TargetAware.prototype
}

Powered by Google App Engine
This is Rietveld 408576698