# Class SWTHTMLElement

java.lang.Object
org.eclipse.e4.ui.css.core.dom.ElementAdapter
org.eclipse.e4.ui.css.swt.dom.WidgetElement
org.eclipse.e4.ui.css.swt.dom.html.SWTHTMLElement

All Implemented Interfaces:
  `CSSStylableElement, Element, Node, NodeList`

public class SWTHTMLElement extends WidgetElement
w3c Element which wrap SWT widget to manage HTML/XUL selectors.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`attributeType`

### Fields inherited from class WidgetElement

`localName, namespaceURI, swtStyles`

### Fields inherited from class ElementAdapter

`engine`

### Fields inherited from interface Node

`ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE`

## Constructor Summary

Constructors
Constructor
Description
`SWTHTMLElement(Widget widget, CSSEngine engine)`

## Method Summary

Modifier and Type
Method
Description
`protected String`
`computeAttributeType()`
`protected String`
`computeLocalName()`
Compute local name.
`protected Supplier<String>`
`internalGetAttribute(String attr)`
The goal for `WidgetElement.internalGetAttribute(String)` is to share the code of `WidgetElement.hasAttribute(String)` and `WidgetElement.getAttribute(String)` and to keep the performance footprint for `WidgetElement.hasAttribute(String)` small.

### Methods inherited from class WidgetElement

`applyStyles, computeAttributeSWTStyle, computeNamespaceURI, computeStaticPseudoInstances, getAttribute, getChildNodes, getCSSClass, getCSSClass, getCSSId, getCSSStyle, getEngine, getEngine, getID, getLength, getLocalName, getNamespaceURI, getParentNode, getWidget, hasAttribute, item, reset, setCSSClass, setEngine, setID, toString`

### Methods inherited from class ElementAdapter

`addStaticPseudoInstance, appendChild, cloneNode, compareDocumentPosition, copyDefaultStyleDeclarations, dispose, doApplyStyles, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getDefaultStyleDeclaration, getElement, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getNativeWidget, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getPrefix, getPreviousSibling, getSchemaTypeInfo, getStaticPseudoInstances, getStyle, getTagName, getTextContent, getUserData, hasAttributeNS, hasAttributes, hasChildNodes, initialize, insertBefore, isDefaultNamespace, isEqualNode, isPseudoInstanceOf, isSameNode, isStaticPseudoInstance, isSupported, lookupNamespaceURI, lookupPrefix, normalize, onStylesApplied, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultStyleDeclaration, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### attributeType

protected String attributeType

## Constructor Details

### SWTHTMLElement

public SWTHTMLElement(Widget widget, CSSEngine engine)

## Method Details

### internalGetAttribute

protected Supplier<String> internalGetAttribute(String attr)
Description copied from class: `WidgetElement`
The goal for `WidgetElement.internalGetAttribute(String)` is to share the code of `WidgetElement.hasAttribute(String)` and `WidgetElement.getAttribute(String)` and to keep the performance footprint for `WidgetElement.hasAttribute(String)` small. This shall be accomplished by:

- The method shall only be a lookup for a supplier, no actual computation shall be made.
- The result of the supplier must hold the requirements of the result of `WidgetElement.getAttribute(String)`. Especially it must not return `null`.
- If the attribute isn't set on the widget, the method must return `null`.

Overrides:
  `internalGetAttribute` in class `WidgetElement`
Parameters:
  `attr` - the name of the attribute to look for.
Returns:
  a supplier which will return the actual attribute value or `null` if the attribute isn't set for the widget.

### computeLocalName

protected String computeLocalName()
Description copied from class: `WidgetElement`
Compute local name.

Overrides:
  `computeLocalName` in class `WidgetElement`

### computeAttributeType

protected String computeAttributeType()