public class DefaultElementFactory extends Object implements ElementFactory
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.| Modifier and Type | Field and Description |
|---|---|
static List<String> |
SUPPORTED_TAGS_
You can generate your own test cases by looking into
org.htmlunit.source.ElementTestSource#generateTestForHtmlElements(String, String).
|
| Constructor and Description |
|---|
DefaultElementFactory() |
| Modifier and Type | Method and Description |
|---|---|
HtmlElement |
createElement(SgmlPage page,
String tagName,
Attributes attributes)
Creates an element according to this factory's specification.
|
HtmlElement |
createElementNS(SgmlPage page,
String namespaceURI,
String qualifiedName,
Attributes attributes)
Creates an element according to this factory's specification.
|
public HtmlElement createElement(SgmlPage page, String tagName, Attributes attributes)
ElementFactorycreateElement in interface ElementFactorypage - the owning pagetagName - the HTML tag nameattributes - initial attributes, possibly nullpublic HtmlElement createElementNS(SgmlPage page, String namespaceURI, String qualifiedName, Attributes attributes)
ElementFactorycreateElementNS in interface ElementFactorypage - the owning pagenamespaceURI - the URI that identifies an XML namespacequalifiedName - the qualified name of the element type to instantiateattributes - initial attributes, possibly nullCopyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.