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

Class DefaultElementFactory

  • All Implemented Interfaces:
    ElementFactory


    public class DefaultElementFactory
    extends Object
    implements ElementFactory 
    INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
    Element factory which creates elements by calling the constructor on a given HtmlElement subclass. The constructor is expected to take 2 arguments of type HtmlPage and Map where the first one is the owning page of the element, the second one is a map holding the initial attributes for the element.
    Author:
    Christian Sell, Marc Guillemot, Ahmed Ashour, David K. Taylor, Dmitri Zoubkov, Ronald Brill, Frank Danek
    • Field Detail

      • SUPPORTED_TAGS_

        public static final List<String> SUPPORTED_TAGS_
        You can generate your own test cases by looking into org.htmlunit.source.ElementTestSource#generateTestForHtmlElements(String, String).
    • Constructor Detail

      • DefaultElementFactory

        public DefaultElementFactory()
    • Method Detail

      • createElement

        public HtmlElement createElement(SgmlPage page,
         String tagName,
         Attributes attributes)
        Description copied from interface: ElementFactory
        Creates an element according to this factory's specification. Note that even though this method takes a page parameter, the element is not automatically added to the page's DOM tree.
        Specified by:
        createElement in interface ElementFactory
        Parameters:
        page - the owning page
        tagName - the HTML tag name
        attributes - initial attributes, possibly null
        Returns:
        the newly created element
      • createElementNS

        public HtmlElement createElementNS(SgmlPage page,
         String namespaceURI,
         String qualifiedName,
         Attributes attributes)
        Description copied from interface: ElementFactory
        Creates an element according to this factory's specification. Note that even though this method takes a page parameter, the element is not automatically added to the page's DOM tree.
        Specified by:
        createElementNS in interface ElementFactory
        Parameters:
        page - the owning page
        namespaceURI - the URI that identifies an XML namespace
        qualifiedName - the qualified name of the element type to instantiate
        attributes - initial attributes, possibly null
        Returns:
        the newly created element
Skip navigation links

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

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