code: function(node, userCallback)
      {
          var pseudoType = node.pseudoType();
          var effectiveNode = pseudoType ? node.parentNode : node;
          if (!effectiveNode)
              return;
  
          function resolvedNode(object)
          {
              if (!object)
                  return;
  
              /**
               * @param {?string} pseudoType
               * @suppressGlobalPropertiesCheck
               * @suppressReceiverCheck
               * @this {!Element}
               */
              function toggleClassAndInjectStyleRule(pseudoType)
              {
                  const classNamePrefix = "__web-inspector-hide";
                  const classNameSuffix = "-shortcut__";
                  const styleTagId = "__web-inspector-hide-shortcut-style__";
                  var selectors = [];
                  selectors.push("html /deep/ .__web-inspector-hide-shortcut__");
                  selectors.push("html /deep/ .__web-inspector-hide-shortcut__ /deep/ *");
                  selectors.push("html /deep/ .__web-inspector-hidebefore-shortcut__::before");
                  selectors.push("html /deep/ .__web-inspector-hideafter-shortcut__::after");
                  var selector = selectors.join(", ");
                  var ruleBody = "    visibility: hidden !important;";
                  var rule = "\n" + selector + "\n{\n" + ruleBody + "\n}\n";
  
                  var className = classNamePrefix + (pseudoType || "") + classNameSuffix;
                  this.classList.toggle(className);
  
                  var style = document.head.querySelector("style#" + styleTagId);
                  if (style)
                      return;
  
                  style = document.createElement("style");
                  style.id = styleTagId;
                  style.type = "text/css";
                  style.textContent = rule;
                  document.head.appendChild(style);
              }
  
              object.callFunction(toggleClassAndInjectStyleRule, [{ value: pseudoType }], userCallback);
              object.release();
          }
  
          effectiveNode.resolveToObject("", resolvedNode);
      }
docs: Runs a script on the node's remote object that toggles a class name on
  the node and injects a stylesheet into the head of the node's document
  containing a rule to set "visibility: hidden" on the class and all it's
  ancestors.
  
  @param {!WebInspector.DOMNode} node
  @param {function(?WebInspector.RemoteObject, boolean=)=} userCallback