DOM::HTMLElement

#include <html_element.h>

Inherits DOM::Element.

Inherited by DOM::HTMLAnchorElement, DOM::HTMLAppletElement, DOM::HTMLAreaElement, DOM::HTMLBaseElement, DOM::HTMLBaseFontElement, DOM::HTMLBlockquoteElement, DOM::HTMLBodyElement, DOM::HTMLBRElement, DOM::HTMLButtonElement, DOM::HTMLDirectoryElement, DOM::HTMLDivElement, DOM::HTMLDListElement, DOM::HTMLFieldSetElement, DOM::HTMLFontElement, DOM::HTMLFormElement, DOM::HTMLFrameElement, DOM::HTMLFrameSetElement, DOM::HTMLHeadElement, DOM::HTMLHeadingElement, DOM::HTMLHRElement, DOM::HTMLHtmlElement, DOM::HTMLIFrameElement, DOM::HTMLImageElement, DOM::HTMLInputElement, DOM::HTMLIsIndexElement, DOM::HTMLLabelElement, DOM::HTMLLayerElement, DOM::HTMLLegendElement, DOM::HTMLLIElement, DOM::HTMLLinkElement, DOM::HTMLMapElement, DOM::HTMLMenuElement, DOM::HTMLMetaElement, DOM::HTMLModElement, DOM::HTMLObjectElement, DOM::HTMLOListElement, DOM::HTMLOptGroupElement, DOM::HTMLOptionElement, DOM::HTMLParagraphElement, DOM::HTMLParamElement, DOM::HTMLPreElement, DOM::HTMLQuoteElement, DOM::HTMLScriptElement, DOM::HTMLSelectElement, DOM::HTMLStyleElement, DOM::HTMLTableCaptionElement, DOM::HTMLTableCellElement, DOM::HTMLTableColElement, DOM::HTMLTableElement, DOM::HTMLTableRowElement, DOM::HTMLTableSectionElement, DOM::HTMLTextAreaElement, DOM::HTMLTitleElement, and DOM::HTMLUListElement.

Public Member Functions

 HTMLElement (const HTMLElement &other)
 
 HTMLElement (const Node &other)
 
void addCSSProperty (const DOMString &property, const DOMString &value)
 
HTMLCollection all () const
 
HTMLCollection children () const
 
DOMString className () const
 
DOMString contentEditable () const
 
DOMString dir () const
 
DOMString id () const
 
DOMString innerHTML () const
 
DOMString innerText () const
 
bool isContentEditable () const
 
DOMString lang () const
 
HTMLElementoperator= (const HTMLElement &other)
 
HTMLElementoperator= (const Node &other)
 
void removeCSSProperty (const DOMString &property)
 
void setClassName (const DOMString &)
 
void setContentEditable (const DOMString &enabled)
 
void setDir (const DOMString &)
 
void setId (const DOMString &)
 
void setInnerHTML (const DOMString &html)
 
void setInnerText (const DOMString &text)
 
void setLang (const DOMString &)
 
void setTitle (const DOMString &)
 
DOMString title () const
 
- Public Member Functions inherited from DOM::Element
 Element (const Node &other)
 
 Element (const Element &other)
 
unsigned long childElementCount () const
 
bool contentEditable () const
 
Element firstElementChild () const
 
Element form () const
 
DOMString getAttribute (const DOMString &name)
 
Attr getAttributeNode (const DOMString &name)
 
Attr getAttributeNodeNS (const DOMString &namespaceURI, const DOMString &localName)
 
DOMString getAttributeNS (const DOMString &namespaceURI, const DOMString &localName)
 
NodeList getElementsByClassName (const DOMString &className)
 
NodeList getElementsByTagName (const DOMString &name)
 
NodeList getElementsByTagNameNS (const DOMString &namespaceURI, const DOMString &localName)
 
bool hasAttribute (const DOMString &name)
 
bool hasAttributeNS (const DOMString &namespaceURI, const DOMString &localName)
 
bool isHTMLElement () const
 
Element lastElementChild () const
 
Element nextElementSibling () const
 
Elementoperator= (const Node &other)
 
Elementoperator= (const Element &other)
 
Element previousElementSibling () const
 
Element querySelector (const DOMString &query) const
 
NodeList querySelectorAll (const DOMString &query) const
 
void removeAttribute (const DOMString &name)
 
Attr removeAttributeNode (const Attr &oldAttr)
 
void removeAttributeNS (const DOMString &namespaceURI, const DOMString &localName)
 
void setAttribute (const DOMString &name, const DOMString &value)
 
Attr setAttributeNode (const Attr &newAttr)
 
Attr setAttributeNodeNS (const Attr &newAttr)
 
void setAttributeNS (const DOMString &namespaceURI, const DOMString &qualifiedName, const DOMString &value)
 
void setContentEditable (bool enabled)
 
CSSStyleDeclaration style ()
 
DOMString tagName () const
 
- Public Member Functions inherited from DOM::Node
 Node (const Node &other)
 
 Node (NodeImpl *_impl)
 
void addEventListener (const DOMString &type, EventListener *listener, const bool useCapture)
 
Node appendChild (const Node &newChild)
 
void applyChanges ()
 
NamedNodeMap attributes () const
 
NodeList childNodes () const
 
Node cloneNode (bool deep)
 
unsigned compareDocumentPosition (const DOM::Node &other)
 
bool dispatchEvent (const Event &evt)
 
quint32 elementId () const
 
Node firstChild () const
 
KHTML_DEPRECATED void getCursor (int offset, int &_x, int &_y, int &height)
 
QRect getRect ()
 
NodeImpl * handle () const
 
bool hasAttributes ()
 
bool hasChildNodes ()
 
unsigned long index () const
 
Node insertBefore (const Node &newChild, const Node &refChild)
 
bool isNull () const
 
bool isSupported (const DOMString &feature, const DOMString &version) const
 
Node lastChild () const
 
DOMString localName () const
 
DOMString namespaceURI () const
 
Node nextSibling () const
 
DOMString nodeName () const
 
unsigned short nodeType () const
 
DOMString nodeValue () const
 
void normalize ()
 
bool operator!= (const Node &other) const
 
Nodeoperator= (const Node &other)
 
bool operator== (const Node &other) const
 
Document ownerDocument () const
 
Node parentNode () const
 
DOMString prefix () const
 
Node previousSibling () const
 
Node removeChild (const Node &oldChild)
 
void removeEventListener (const DOMString &type, EventListener *listener, bool useCapture)
 
Node replaceChild (const Node &newChild, const Node &oldChild)
 
void setNodeValue (const DOMString &)
 
void setPrefix (const DOMString &prefix)
 
void setTextContent (const DOMString &text)
 
DOMString textContent () const
 
KHTML_DEPRECATED QString toHTML ()
 

Protected Member Functions

 HTMLElement (HTMLElementImpl *impl)
 
void assignOther (const Node &other, int elementId)
 
- Protected Member Functions inherited from DOM::Element
 Element (ElementImpl *_impl)
 

Additional Inherited Members

- Public Types inherited from DOM::Node
enum  DocumentPosition {
  DOCUMENT_POSITION_DISCONNECTED = 0x01, DOCUMENT_POSITION_PRECEDING = 0x02, DOCUMENT_POSITION_FOLLOWING = 0x04, DOCUMENT_POSITION_CONTAINS = 0x08,
  DOCUMENT_POSITION_CONTAINED_BY = 0x10, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
}
 
enum  NodeType {
  ELEMENT_NODE = 1, ATTRIBUTE_NODE = 2, TEXT_NODE = 3, CDATA_SECTION_NODE = 4,
  ENTITY_REFERENCE_NODE = 5, ENTITY_NODE = 6, PROCESSING_INSTRUCTION_NODE = 7, COMMENT_NODE = 8,
  DOCUMENT_NODE = 9, DOCUMENT_TYPE_NODE = 10, DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12,
  XPATH_NAMESPACE_NODE = 13
}
 
- Static Public Member Functions inherited from DOM::Element
static bool khtmlMalformedPrefix (const DOMString &name)
 
static bool khtmlMalformedQualifiedName (const DOMString &name)
 
static bool khtmlValidAttrName (const DOMString &name)
 
static bool khtmlValidPrefix (const DOMString &name)
 
static bool khtmlValidQualifiedName (const DOMString &name)
 
- Protected Attributes inherited from DOM::Node
NodeImpl * impl
 

Detailed Description

All HTML element interfaces derive from this class.

Elements that only expose the HTML core attributes are represented by the base HTMLElement interface. These elements are as follows:

  • HEAD
  • special: SUB, SUP, SPAN, BDO
  • font: TT, I, B, U, S, STRIKE, BIG, SMALL
  • phrase: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ACRONYM, ABBR
  • list: DD, DT
  • NOFRAMES, NOSCRIPT
  • ADDRESS, CENTER

Note: The style attribute for this interface is reserved for future usage.

Definition at line 70 of file html_element.h.

Member Function Documentation

HTMLCollection HTMLElement::all ( ) const

Retrieves a collection of all nodes that descend from this node.

IE-specific extension.

Definition at line 204 of file html_element.cpp.

HTMLCollection HTMLElement::children ( ) const

Retrieves a collection of nodes that are direct descendants of this node.

IE-specific extension.

Definition at line 196 of file html_element.cpp.

DOMString HTMLElement::className ( ) const

The class attribute of the element.

This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages. See the class attribute definition in HTML 4.0.

Definition at line 125 of file html_element.cpp.

DOMString HTMLElement::contentEditable ( ) const

Returns the kind of editability that applies to this element.

The returned string is one of:

  • true: This element has been set to be editable.
  • false: This element has been set not to be editable.
  • inherit: This element inherits its editability from the parent.

This function is not part of the DOM specifications as defined by the w3c.

Definition at line 232 of file html_element.cpp.

DOMString HTMLElement::dir ( ) const

Specifies the base direction of directionally neutral text and the directionality of tables.

See the dir attribute definition in HTML 4.0.

Definition at line 110 of file html_element.cpp.

DOMString HTMLElement::id ( ) const

The element's identifier.

See the id attribute definition in HTML 4.0.

Definition at line 65 of file html_element.cpp.

DOMString HTMLElement::innerHTML ( ) const

The HTML code contained in this element.

This function is not part of the DOM specifications as defined by the w3c.

Definition at line 156 of file html_element.cpp.

DOMString HTMLElement::innerText ( ) const

The text contained in this element.

This function is not part of the DOM specifications as defined by the w3c.

Definition at line 176 of file html_element.cpp.

bool HTMLElement::isContentEditable ( ) const

Returns whether this element is editable.

This function is not part of the DOM specifications as defined by the w3c.

Definition at line 224 of file html_element.cpp.

DOMString HTMLElement::lang ( ) const

Language code defined in RFC 1766.

See the lang attribute definition in HTML 4.0.

Definition at line 95 of file html_element.cpp.

void HTMLElement::setClassName ( const DOMString value)

see className

Definition at line 133 of file html_element.cpp.

void HTMLElement::setContentEditable ( const DOMString enabled)

Sets the editability of this element.

This function is not part of the DOM specifications as defined by the w3c.

Parameters
enabledmay be one of:
  • true: make element editable
  • false: make element not editable
  • inherit: make element inherit editability from parent.

Definition at line 240 of file html_element.cpp.

void HTMLElement::setDir ( const DOMString value)

see dir

Definition at line 118 of file html_element.cpp.

void HTMLElement::setId ( const DOMString value)

see id

Definition at line 73 of file html_element.cpp.

void HTMLElement::setInnerHTML ( const DOMString html)

Set the HTML content of this node.

Exceptions
DOMExceptionNO_MODIFICATION_ALLOWED_ERR: Raised if there is the element does not allow children.

Definition at line 164 of file html_element.cpp.

void HTMLElement::setInnerText ( const DOMString text)

Set the text content of this node.

Exceptions
DOMExceptionNO_MODIFICATION_ALLOWED_ERR: Raised if there is the element does not allow children.

Definition at line 184 of file html_element.cpp.

void HTMLElement::setLang ( const DOMString value)

see lang

Definition at line 103 of file html_element.cpp.

void HTMLElement::setTitle ( const DOMString value)

see title

Definition at line 88 of file html_element.cpp.

DOMString HTMLElement::title ( ) const

The element's advisory title.

See the title attribute definition in HTML 4.0.

Definition at line 80 of file html_element.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Nov 21 2020 22:46:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.