MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / DomElement

Class DomElement

src/main/java/org/htmlunit/html/DomElement.java:77–1695  ·  view source on GitHub ↗

@author Ahmed Ashour @author Marc Guillemot @author Tom Anderson @author Ronald Brill @author Frank Danek @author Sven Strickroth

Source from the content-addressed store, hash-verified

75 * @author Sven Strickroth
76 */
77public class DomElement extends DomNamespaceNode implements Element {
78
79 private static final Log LOG = LogFactory.getLog(DomElement.class);
80
81 /** id. */
82 public static final String ID_ATTRIBUTE = "id";
83
84 /** name. */
85 public static final String NAME_ATTRIBUTE = "name";
86
87 /** src. */
88 public static final String SRC_ATTRIBUTE = "src";
89
90 /** value. */
91 public static final String VALUE_ATTRIBUTE = "value";
92
93 /** type. */
94 public static final String TYPE_ATTRIBUTE = "type";
95
96 /** Constant meaning that the specified attribute was not defined. */
97 public static final String ATTRIBUTE_NOT_DEFINED = new String("");
98
99 /** Constant meaning that the specified attribute was found but its value was empty. */
100 public static final String ATTRIBUTE_VALUE_EMPTY = new String();
101
102 /** The map holding the attributes, keyed by name. */
103 private NamedAttrNodeMapImpl attributes_;
104
105 /** The map holding the namespaces, keyed by URI. */
106 private FastHashMap<String, String> namespaces_;
107
108 /** Cache for the styles. */
109 private String styleString_;
110 private LinkedHashMap<String, StyleElement> styleMap_;
111
112 private static final Comparator<StyleElement> STYLE_ELEMENT_COMPARATOR =
113 (first, second) -> StyleElement.compareToByImportanceAndSpecificity(first, second);
114
115 /**
116 * Whether the Mouse is currently over this element or not.
117 */
118 private boolean mouseOver_;
119
120 /**
121 * Creates an instance of a DOM element that can have a namespace.
122 *
123 * @param namespaceURI the URI that identifies an XML namespace
124 * @param qualifiedName the qualified name of the element type to instantiate
125 * @param page the page that contains this element
126 * @param attributes a map ready initialized with the attributes for this element, or
127 * {@code null}. The map will be stored as is, not copied.
128 */
129 public DomElement(final String namespaceURI, final String qualifiedName, final SgmlPage page,
130 final Map<String, DomAttr> attributes) {
131 super(namespaceURI, qualifiedName, page);
132
133 if (attributes == null) {
134 attributes_ = new NamedAttrNodeMapImpl(this, isAttributeCaseSensitive());

Callers

nothing calls this directly

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…