• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • DOM
  • HTMLElement
Public Member Functions | Protected Member Functions | List of all members
DOM::HTMLElement Class Reference

#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 ()
 
 HTMLElement (const HTMLElement &other)
 
 HTMLElement (const Node &other)
 
 ~HTMLElement ()
 
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
 
HTMLElement & operator= (const HTMLElement &other)
 
HTMLElement & operator= (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 ()
 
 Element (const Node &other)
 
 Element (const Element &other)
 
 ~Element ()
 
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
 
Element & operator= (const Node &other)
 
Element & operator= (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 ()
 
 Node (const Node &other)
 
 Node (NodeImpl *_impl)
 
virtual ~Node ()
 
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
 
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
 
Node & operator= (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
 
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 69 of file html_element.h.

Constructor & Destructor Documentation

HTMLElement::HTMLElement ( )

Definition at line 29 of file html_element.cpp.

HTMLElement::HTMLElement ( const HTMLElement &  other)

Definition at line 33 of file html_element.cpp.

DOM::HTMLElement::HTMLElement ( const Node &  other)
inline

Definition at line 80 of file html_element.h.

HTMLElement::HTMLElement ( HTMLElementImpl *  impl)
protected

Definition at line 37 of file html_element.cpp.

HTMLElement::~HTMLElement ( )

Definition at line 59 of file html_element.cpp.

Member Function Documentation

void HTMLElement::addCSSProperty ( const DOMString &  property,
const DOMString &  value 
)

Definition at line 125 of file html_element.cpp.

HTMLCollection HTMLElement::all ( ) const

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

IE-specific extension.

Definition at line 170 of file html_element.cpp.

void HTMLElement::assignOther ( const Node &  other,
int  elementId 
)
protected

Definition at line 176 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 164 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 107 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 192 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 96 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 63 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 132 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 148 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 186 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 85 of file html_element.cpp.

HTMLElement & HTMLElement::operator= ( const HTMLElement &  other)

Definition at line 41 of file html_element.cpp.

HTMLElement & HTMLElement::operator= ( const Node &  other)

Definition at line 47 of file html_element.cpp.

void HTMLElement::removeCSSProperty ( const DOMString &  property)

Definition at line 118 of file html_element.cpp.

void HTMLElement::setClassName ( const DOMString &  value)

see className

Definition at line 113 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 197 of file html_element.cpp.

void HTMLElement::setDir ( const DOMString &  value)

see dir

Definition at line 102 of file html_element.cpp.

void HTMLElement::setId ( const DOMString &  value)

see id

Definition at line 69 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 138 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 154 of file html_element.cpp.

void HTMLElement::setLang ( const DOMString &  value)

see lang

Definition at line 91 of file html_element.cpp.

void HTMLElement::setTitle ( const DOMString &  value)

see title

Definition at line 80 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 74 of file html_element.cpp.


The documentation for this class was generated from the following files:
  • html_element.h
  • html_element.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal