docs: private static boolean internalHasClass(String className, Element element) {
  
          boolean hasClass = false;
          try {
              String elementClass = element.getClassName().trim();
              hasClass = elementClass.equals(className);
              hasClass |= elementClass.contains(" " + className + " ");
              hasClass |= elementClass.startsWith(className + " ");
              hasClass |= elementClass.endsWith(" " + className);
          } catch (Throwable t) {
              // ignore
          }
          return hasClass;
      }