WEBELO
HTML Visualizer & DOM Library
Loading...
Searching...
No Matches
Element Class Reference
Inheritance diagram for Element:
ParentNode Node EventTarget HTMLSlotElement

Public Member Functions

DOMString html_uppercased_qualified_name ()
 Element (std::optional< DOMString > namesp, std::optional< DOMString > prefix, DOMString localName, CustomElementRegistry *customElementRegistry=nullptr, ElementState customElementState=UNDEFINED, Document *ownerdoc=nullptr, Node *parentnode=nullptr)
ElementpreviousElementSibling ()
ElementnextElementSibling ()
DOMString tagName ()
void setAttribute (DOMString qualifiedName, DOMString value)
void setAttributeNS (std::optional< DOMString > namesp, DOMString qualifiedName, DOMString value)
void removeAttribute (DOMString qualifiedName)
void removeAttributeNS (std::optional< DOMString > namesp, DOMString localName)
bool toggleAttribute (DOMString qualifiedName, std::optional< bool > force)
AttrsetAttributeNode (Attr *attr)
AttrsetAttributeNodeNS (Attr *attr)
AttrremoveAttributeNode (Attr *attr)
bool hasAttributes ()
std::vector< DOMString > getAttributeNames ()
std::optional< DOMString > getAttribute (DOMString qualifiedName)
std::optional< DOMString > getAttributeNS (std::optional< DOMString > namesp, DOMString localName)
bool hasAttribute (DOMString qualifiedName)
bool hasAttributeNS (std::optional< DOMString > namesp, DOMString localname)
AttrgetAttributeNode (DOMString qualifiedName)
AttrgetAttributeNodeNS (std::optional< DOMString > namesp, DOMString localName)
ShadowRootattachShadow (ShadowRootInit init)
std::optional< Elementclosest (DOMString selectors)
bool matches (DOMString selectors)
HTMLCollectiongetElementsByTagName (DOMString qualifiedName)
HTMLCollectiongetElementsByTagNameNS (std::optional< DOMString > namesp, DOMString localName)
HTMLCollectiongetElementsByClassName (DOMString classNames)
ElementinsertAdjacentElement (DOMString where, Element element)
void insertAdjacentText (DOMString where, DOMString data)
bool operator== (Element *other)
virtual void making_it_abstract ()
DOMString getid ()
void setid (DOMString value)
DOMString getclassName ()
void setclassName (DOMString value)
DOMString getslot ()
void setslot (DOMString value)
ShadowRootgetshadow_root ()
void update_slot_name (DOMString name, std::optional< DOMString > oldvalue, std::optional< DOMString > value)
Public Member Functions inherited from ParentNode
ElementfirstElementChild () const
ElementlastElementChild () const
unsigned long childElementCount () const
void evaluate_children ()
void prepend (std::vector< std::variant< Node *, DOMString > > &nodes)
void append (std::vector< std::variant< Node *, DOMString > > &nodes)
void replaceChildren (std::vector< std::variant< Node *, DOMString > > &nodes)
void moveBefore (Node *node, Node *child)
ElementquerySelector (DOMString selectors)
NodeList querySelectorAll (DOMString selectors)
 ParentNode (node_type nodeType, DOMString nodeName, Document *ownerDocument, Node *parentNode)
Public Member Functions inherited from Node
bool isConnected ()
virtual NodefirstChild ()
virtual NodelastChild ()
virtual NodepreviousSibling ()
virtual NodenextSibling ()
bool hasChildNodes () const
NodegetRootNode (bool composed=false)
void normalize ()
NodecloneNode (bool subtree)
 Node (node_type nodeType, DOMString nodeName, Document *ownerDocument=nullptr, Node *parentNode=nullptr)
unsigned long length ()
bool isEqualNode (Node *otherNode)
bool isSameNode (Node *otherNode)
unsigned short compareDocumentPosition (Node *other)
bool contains (Node *other)
virtual std::optional< DOMString > lookupPrefix (std::optional< DOMString > &namesp)
std::optional< DOMString > lookupNamespaceURI (std::optional< DOMString > &prefix)
bool isDefaultNamespace (std::optional< DOMString > &namesp)
NodeinsertBefore (Node *node, Node *child)
NodeappendChild (Node *node)
NodereplaceChild (Node *node, Node *child)
NoderemoveChild (Node *child)
virtual Nodeget_the_parent (Event *event)
virtual std::optional< DOMString > getnodeValue ()
virtual void setnodeValue (DOMString &val)
virtual std::optional< DOMString > gettextContent ()
virtual void settextContent (DOMString &val)
bool operator== (Node &other)
bool operator^ (Node *other)
unsigned long index ()
Public Member Functions inherited from EventTarget
void addEventListener (DOMString &type, EventListener *callback, std::variant< AddEventListenerOptions, bool > &options)
void removeEventListener (DOMString &type, EventListener *callback, bool capture)
void removeAllEventListeners ()
bool dispatchEvent (Event *event)
bool operator== (const EventTarget &a)
bool operator!= (const EventTarget &a)
virtual EventTargetget_the_parent (const Event *event)

Public Attributes

std::optional< DOMString > namespaceURI
std::optional< DOMString > prefix
DOMString localName
NamedNodeMap attributes
ShadowRootshadow_root = nullptr
CustomElementRegistrycustomElementRegistry
ElementState customElementState
DOMString id
DOMString className
DOMString slot =""
HTMLSlotElementassignedSlot
std::optional< DOMString > is
Public Attributes inherited from ParentNode
HTMLCollection children
Public Attributes inherited from Node
node_type nodeType
DOMString nodeName
USVString baseURI
DocumentownerDocument
NodeparentNode
ElementparentElement = nullptr
NodeList childNodes
DOMString nodeValue
DOMString textContent
Public Attributes inherited from EventTarget
bool has_activation_behavior = false
bool has_legacy_canceled_activation_behavior = false
bool has_legacy_pre_activation_behavior = false
std::function< void(Event *event)> activation_behavior_algorithm = [](Event* event) {}
std::function< void()> legacy_canceled_activation_behavior_algorithm = []() {}
std::function< void()> legacy_pre_activation_behavior_algorithm = []() {}
std::vector< event_listener * > event_listener_list = {}

Detailed Description

Definition at line 1255 of file Webelo.cpp.

Constructor & Destructor Documentation

◆ Element()

Element::Element ( std::optional< DOMString > namesp,
std::optional< DOMString > prefix,
DOMString localName,
CustomElementRegistry * customElementRegistry = nullptr,
ElementState customElementState = UNDEFINED,
Document * ownerdoc = nullptr,
Node * parentnode = nullptr )
inline

Definition at line 1282 of file Webelo.cpp.

Member Function Documentation

◆ attachShadow()

ShadowRoot * Element::attachShadow ( ShadowRootInit init)

Definition at line 4646 of file Webelo.cpp.

◆ getAttribute()

std::optional< DOMString > Element::getAttribute ( DOMString qualifiedName)

Definition at line 4494 of file Webelo.cpp.

◆ getAttributeNames()

std::vector< DOMString > Element::getAttributeNames ( )

Definition at line 4480 of file Webelo.cpp.

◆ getAttributeNode()

Attr * Element::getAttributeNode ( DOMString qualifiedName)

Definition at line 4619 of file Webelo.cpp.

◆ getAttributeNodeNS()

Attr * Element::getAttributeNodeNS ( std::optional< DOMString > namesp,
DOMString localName )

Definition at line 4623 of file Webelo.cpp.

◆ getAttributeNS()

std::optional< DOMString > Element::getAttributeNS ( std::optional< DOMString > namesp,
DOMString localName )

Definition at line 4500 of file Webelo.cpp.

◆ getclassName()

DOMString Element::getclassName ( )
inline

Definition at line 1348 of file Webelo.cpp.

◆ getElementsByClassName()

HTMLCollection * Element::getElementsByClassName ( DOMString classNames)

Definition at line 4677 of file Webelo.cpp.

◆ getElementsByTagName()

HTMLCollection * Element::getElementsByTagName ( DOMString qualifiedName)

Definition at line 4667 of file Webelo.cpp.

◆ getElementsByTagNameNS()

HTMLCollection * Element::getElementsByTagNameNS ( std::optional< DOMString > namesp,
DOMString localName )

Definition at line 4672 of file Webelo.cpp.

◆ getid()

DOMString Element::getid ( )
inline

Definition at line 1340 of file Webelo.cpp.

◆ getshadow_root()

ShadowRoot * Element::getshadow_root ( )
inline

Definition at line 1364 of file Webelo.cpp.

◆ getslot()

DOMString Element::getslot ( )
inline

Definition at line 1356 of file Webelo.cpp.

◆ hasAttribute()

bool Element::hasAttribute ( DOMString qualifiedName)

Definition at line 4553 of file Webelo.cpp.

◆ hasAttributeNS()

bool Element::hasAttributeNS ( std::optional< DOMString > namesp,
DOMString localname )

Definition at line 4608 of file Webelo.cpp.

◆ hasAttributes()

bool Element::hasAttributes ( )

Definition at line 4473 of file Webelo.cpp.

◆ html_uppercased_qualified_name()

DOMString Element::html_uppercased_qualified_name ( )
inline

Definition at line 1272 of file Webelo.cpp.

◆ insertAdjacentElement()

Element * Element::insertAdjacentElement ( DOMString where,
Element element )

Definition at line 4656 of file Webelo.cpp.

◆ insertAdjacentText()

void Element::insertAdjacentText ( DOMString where,
DOMString data )

Definition at line 4661 of file Webelo.cpp.

◆ making_it_abstract()

virtual void Element::making_it_abstract ( )
inlinevirtual

Reimplemented from ParentNode.

Definition at line 1335 of file Webelo.cpp.

◆ nextElementSibling()

Element * Element::nextElementSibling ( )

Definition at line 4189 of file Webelo.cpp.

◆ operator==()

bool Element::operator== ( Element * other)
inline

Definition at line 1333 of file Webelo.cpp.

◆ previousElementSibling()

Element * Element::previousElementSibling ( )

Definition at line 4176 of file Webelo.cpp.

◆ removeAttribute()

void Element::removeAttribute ( DOMString qualifiedName)

Definition at line 4544 of file Webelo.cpp.

◆ removeAttributeNode()

Attr * Element::removeAttributeNode ( Attr * attr)

Definition at line 4635 of file Webelo.cpp.

◆ removeAttributeNS()

void Element::removeAttributeNS ( std::optional< DOMString > namesp,
DOMString localName )

Definition at line 4548 of file Webelo.cpp.

◆ setAttribute()

void Element::setAttribute ( DOMString qualifiedName,
DOMString value )

Definition at line 4507 of file Webelo.cpp.

◆ setAttributeNode()

Attr * Element::setAttributeNode ( Attr * attr)

Definition at line 4627 of file Webelo.cpp.

◆ setAttributeNodeNS()

Attr * Element::setAttributeNodeNS ( Attr * attr)

Definition at line 4631 of file Webelo.cpp.

◆ setAttributeNS()

void Element::setAttributeNS ( std::optional< DOMString > namesp,
DOMString qualifiedName,
DOMString value )

Definition at line 4537 of file Webelo.cpp.

◆ setclassName()

void Element::setclassName ( DOMString value)
inline

Definition at line 1352 of file Webelo.cpp.

◆ setid()

void Element::setid ( DOMString value)
inline

Definition at line 1344 of file Webelo.cpp.

◆ setslot()

void Element::setslot ( DOMString value)
inline

Definition at line 1360 of file Webelo.cpp.

◆ tagName()

DOMString Element::tagName ( )
inline

Definition at line 1293 of file Webelo.cpp.

◆ toggleAttribute()

bool Element::toggleAttribute ( DOMString qualifiedName,
std::optional< bool > force )

Definition at line 4572 of file Webelo.cpp.

◆ update_slot_name()

void Element::update_slot_name ( DOMString name,
std::optional< DOMString > oldvalue,
std::optional< DOMString > value )
inline

Definition at line 1369 of file Webelo.cpp.

Member Data Documentation

◆ assignedSlot

HTMLSlotElement* Element::assignedSlot

Definition at line 1269 of file Webelo.cpp.

◆ attributes

NamedNodeMap Element::attributes

Definition at line 1261 of file Webelo.cpp.

◆ className

DOMString Element::className

Definition at line 1267 of file Webelo.cpp.

◆ customElementRegistry

CustomElementRegistry* Element::customElementRegistry

Definition at line 1263 of file Webelo.cpp.

◆ customElementState

ElementState Element::customElementState

Definition at line 1264 of file Webelo.cpp.

◆ id

DOMString Element::id

Definition at line 1266 of file Webelo.cpp.

◆ is

std::optional<DOMString> Element::is

Definition at line 1270 of file Webelo.cpp.

◆ localName

DOMString Element::localName

Definition at line 1259 of file Webelo.cpp.

◆ namespaceURI

std::optional<DOMString> Element::namespaceURI

Definition at line 1257 of file Webelo.cpp.

◆ prefix

std::optional<DOMString> Element::prefix

Definition at line 1258 of file Webelo.cpp.

◆ shadow_root

ShadowRoot* Element::shadow_root = nullptr

Definition at line 1262 of file Webelo.cpp.

◆ slot

DOMString Element::slot =""

Definition at line 1268 of file Webelo.cpp.


The documentation for this class was generated from the following file: