All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cobraparser.html.domimpl.HTMLOptionsCollectionImpl Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package org.cobraparser.html.domimpl;

import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
import org.w3c.dom.html.HTMLCollection;
import org.w3c.dom.html.HTMLOptionElement;

public class HTMLOptionsCollectionImpl extends DescendentHTMLCollection implements HTMLCollection {
  public static final NodeFilter OPTION_FILTER = new OptionFilter();

  public HTMLOptionsCollectionImpl(final HTMLElementImpl selectElement) {
    super(selectElement, OPTION_FILTER, selectElement.treeLock, false);
  }

  public void setLength(final int length) throws DOMException {
    throw new UnsupportedOperationException();
  }

  private static class OptionFilter implements NodeFilter {
    public boolean accept(final Node node) {
      return node instanceof HTMLOptionElement;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy