static filterElement()

in src/js/webview/WebviewUtils.js [114:128]


  static filterElement(element: Element): Element {
    let field = WebviewStateMachine.fieldName;
    if (field != null) {
      // Try get the filter by key
      let filter = elementFilters.get(field);
      if (filter == null) {
        // Try wildcard match the filters like all.propertyName
        filter = elementFilters.get(field.replace(/^[a-z]*\./i, 'all.'));
      }
      if (filter != null) {
        return filter(element);
      }
    }
    return element;
  }