Index: Source/devtools/front_end/DOMAgent.js |
diff --git a/Source/devtools/front_end/DOMAgent.js b/Source/devtools/front_end/DOMAgent.js |
index 9e4a4fbc0e798309a8597db0cd4333aad2acf490..45a624a87212fa88668abb6770deb0cf6e8c6eb5 100644 |
--- a/Source/devtools/front_end/DOMAgent.js |
+++ b/Source/devtools/front_end/DOMAgent.js |
@@ -49,6 +49,7 @@ WebInspector.DOMNode = function(domAgent, doc, isInShadowTree, payload) { |
this._nodeValue = payload.nodeValue; |
this._pseudoType = payload.pseudoType; |
this._shadowRootType = payload.shadowRootType; |
+ this._frameId = payload.frameId || null; |
this._shadowRoots = []; |
@@ -475,6 +476,17 @@ WebInspector.DOMNode.prototype = { |
}, |
/** |
+ * @return {?PageAgent.FrameId} |
+ */ |
+ frameId: function() |
+ { |
+ var node = this; |
+ while (!node._frameId && node.parentNode) |
+ node = node.parentNode; |
+ return node._frameId; |
+ }, |
+ |
+ /** |
* @param {!Array.<string>} attrs |
* @return {boolean} |
*/ |