src/LiveDevelopment/Agents/HighlightAgent.js
function node(n) {
        if (!LiveDevelopment.config.experimental) {
            return;
        }

        if (!Inspector.config.highlight) {
            return;
        }

        // go to the parent of a text node
        if (n && n.type === 3) {
            n = n.parent;
        }

        // node cannot be highlighted
        if (!n || !n.nodeId || n.type !== 1) {
            return hide();
        }

        // node is already highlighted
        if (_highlight.type === "node" && _highlight.ref === n.nodeId) {
            return;
        }

        // highlight the node
        _highlight = {type: "node", ref: n.nodeId};
        Inspector.DOM.highlightNode(n.nodeId, Inspector.config.highlightConfig);
    }
function node(n) {
        if (!LiveDevelopment.config.experimental) {
            return;
        }

        if (!Inspector.config.highlight) {
            return;
        }

        // go to the parent of a text node
        if (n && n.type === 3) {
            n = n.parent;
        }

        // node cannot be highlighted
        if (!n || !n.nodeId || n.type !== 1) {
            return hide();
        }

        // node is already highlighted
        if (_highlight.type === "node" && _highlight.ref === n.nodeId) {
            return;
        }

        // highlight the node
        _highlight = {type: "node", ref: n.nodeId};
        Inspector.DOM.highlightNode(n.nodeId, Inspector.config.highlightConfig);
    }
function node ( n ) { if ( ! LiveDevelopment . config . experimental ) { return ; } if ( ! Inspector . config . highlight ) { return ; } // go to the parent of a text node if ( n && n . type === 3 ) { n = n . parent ; } // node cannot be highlighted if ( ! n || ! n . nodeId || n . type !== 1 ) { return hide ( ) ; } // node is already highlighted if ( _highlight . type === "node" && _highlight . ref === n . nodeId ) { return ; } // highlight the node _highlight = { type : "node" , ref : n . nodeId } ; Inspector . DOM . highlightNode ( n . nodeId , Inspector . config . highlightConfig ) ; }
Highlight a single node using DOM.highlightNode
@param {DOMNode} node
Highlight a single node using DOM . highlightNode