static highlightElements()

in src/js/webview/WebviewUtils.js [67:84]


  static highlightElements(
    selector: string,
    contextSelector: string,
    className: string
  ): void {
    WebviewUtils.clearHighlights();
    if (selector == '') {
      return;
    }
    // Add class to the new highlighted elements
    let contextElements = document.querySelectorAll(contextSelector);
    for (let context of contextElements) {
      let elements = context.querySelectorAll(selector);
      elements.forEach(function(element) {
        element.classList.add(className);
      });
    }
  }