JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.javascript.host.html

Class HTMLCollection

    • Constructor Detail

      • HTMLCollection

        public HTMLCollection()
        Creates an instance.
      • HTMLCollection

        public HTMLCollection(DomNode domNode,
         boolean attributeChangeSensitive)
        Creates an instance.
        Parameters:
        domNode - parent scope
        attributeChangeSensitive - indicates if the content of the collection may change when an attribute of a descendant node of parentScope changes (attribute added, modified or removed)
    • Method Detail

      • jsConstructor

        public void jsConstructor()
        JavaScript constructor.
      • emptyCollection

        public static HTMLCollection emptyCollection(DomNode domNode)
        Gets an empty collection.
        Parameters:
        domNode - the DOM node
        Returns:
        an empty collection
      • create

        protected HTMLCollection create(DomNode parentScope,
         List<DomNode> initialElements)
        Constructs a new instance with an initial cache value.
        Overrides:
        create in class AbstractList
        Parameters:
        parentScope - the parent scope, on which we listen for changes
        initialElements - the initial content for the cache
        Returns:
        the newly created instance
      • getLength

        public final int getLength()
        Returns the length.
        Overrides:
        getLength in class AbstractList
        Returns:
        the length
      • item

        public Object item(Object index)
        Returns the item or items corresponding to the specified index or key.
        Parameters:
        index - the index or key corresponding to the element or elements to return
        Returns:
        the element or elements corresponding to the specified index or key
        See Also:
        MSDN doc
      • namedItem

        public org.htmlunit.corejs.javascript.Scriptable namedItem(String name)
        Retrieves the item or items corresponding to the specified name (checks ids, and if that does not work, then names).
        Parameters:
        name - the name or id the element or elements to return
        Returns:
        the element or elements corresponding to the specified name or id
        See Also:
        MSDN doc
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /