ift();
      matches.push.apply(matches, node.querySelectorAll(selector));
      for (i = 0; node.children[i]; i++) {
        if (node.children[i].shadowRoot) {
          queue.push(node.children[i].shadowRoot);
        }
      }
    }
    return matches;
  };

  /**
   * Scrolls to a particular set of coordinates in a scroll target.
   * If the scroll target is not defined, then it would use the main document as the target.
   *
   * To scroll in a smooth fashion, you can set the option `behavior: 'smooth'