diff options
Diffstat (limited to 'devtools/client/inspector/markup/markup.js')
-rw-r--r-- | devtools/client/inspector/markup/markup.js | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js index 5d10b003c9..7975d442f8 100644 --- a/devtools/client/inspector/markup/markup.js +++ b/devtools/client/inspector/markup/markup.js @@ -1218,19 +1218,15 @@ MarkupView.prototype = { } else if (type == "idref") { // Select the node in the same document. nodeFront.walkerFront - .document(nodeFront) - .then(doc => { - return nodeFront.walkerFront - .querySelector(doc, "#" + CSS.escape(link)) - .then(node => { - if (!node) { - this.emit("idref-attribute-link-failed"); - return; - } - this.inspector.selection.setNodeFront(node, { - reason: "markup-attribute-link", - }); - }); + .getIdrefNode(nodeFront, CSS.escape(link)) + .then(node => { + if (!node) { + this.emitForTests("idref-attribute-link-failed"); + return; + } + this.inspector.selection.setNodeFront(node, { + reason: "markup-attribute-link", + }); }) .catch(console.error); } @@ -1555,7 +1551,7 @@ MarkupView.prototype = { } }, - _onTargetAvailable({ targetFront }) {}, + _onTargetAvailable() {}, _onTargetDestroyed({ targetFront, isModeSwitching }) { // Bug 1776250: We only watch targets in order to update containers which @@ -2103,14 +2099,12 @@ MarkupView.prototype = { * Mark the given node selected, and update the inspector.selection * object's NodeFront to keep consistent state between UI and selection. * - * @param {NodeFront} aNode + * @param {NodeFront} node * The NodeFront to mark as selected. - * @param {String} reason - * The reason for marking the node as selected. * @return {Boolean} False if the node is already marked as selected, true * otherwise. */ - markNodeAsSelected(node, reason = "nodeselected") { + markNodeAsSelected(node) { const container = this.getContainer(node); return this._markContainerAsSelected(container); }, |