Mac Dev Center Right arrow Mac OS X Reference Library Right arrow Networking, Internet, & Web: Web Client Right arrow WebKit DOM Reference

WebKit DOM Reference Functions/Methods Index

The WebKit Document Object Model is an interface for accessing and modifying the elements within a webpage. WebKit DOM Reference documents the DOM classes that WebKit implements. This document contains classes from the WebKit Open Source Project.

Some of the DOM classes referenced in this document are not present in the WebKit framework in Mac OS X v10.5. To try the latest DOM features, download a nightly build from http://nightly.webkit.org/.

Important: This is a preliminary document. Although it has been reviewed for technical accuracy, it is not final. Apple is supplying this information to help you adopt the technologies and programming interfaces described herein. This information is subject to change, and software implemented according to this document should be vetted against final documentation. For information about updates to this and other developer documentation, you can check the ADC Reference Library Revision List. To receive notification of documentation updates, you can sign up for a free Apple Developer Connection Online membership and receive the bi-weekly ADC News e-mail newsletter. (See http://developer.apple.com/products/ for more details about ADC membership.)



Functions

core

C | D | E | I | N | P | T
CharacterData::appendData
  Element::scrollIntoViewIfNeeded
CharacterData::deleteData
  Element::setAttribute
CharacterData::insertData
  Element::setAttributeNode
CharacterData::replaceData
  Element::setAttributeNodeNS
CharacterData::substringData
  Element::setAttributeNS
Clipboard::clearData
  InspectorController::addBreakpoint
Clipboard::getData
  InspectorController::addResourceSourceToFrame
Clipboard::setData
  InspectorController::addSourceToFrame
Clipboard::setDragImage
  InspectorController::attach
Coordinates::toString
  InspectorController::clearMessages
Document::adoptNode
  InspectorController::closeWindow
Document::createAttribute
  InspectorController::currentCallFrame
Document::createAttributeNS
  InspectorController::databaseTableNames
Document::createCDATASection
  InspectorController::debuggerEnabled
Document::createComment
  InspectorController::detach
Document::createCSSStyleDeclaration
  InspectorController::disableDebugger
Document::createDocumentFragment
  InspectorController::disableProfiler
Document::createElement
  InspectorController::enableDebugger
Document::createElementNS
  InspectorController::enableProfiler
Document::createEntityReference
  InspectorController::getResourceDocumentNode
Document::createEvent
  InspectorController::hiddenPanels
Document::createExpression
  InspectorController::hideDOMNodeHighlight
Document::createNodeIterator
  InspectorController::highlightDOMNode
Document::createNSResolver
  InspectorController::inspectedWindow
Document::createProcessingInstruction
  InspectorController::isWindowVisible
Document::createRange
  InspectorController::loaded
Document::createTextNode
  InspectorController::localizedStringsURL
Document::createTreeWalker
  InspectorController::moveByUnrestricted
Document::elementFromPoint
  InspectorController::pauseInDebugger
Document::evaluate
  InspectorController::pauseOnExceptions
Document::execCommand
  InspectorController::platform
Document::getCSSCanvasContext
  InspectorController::profilerEnabled
Document::getElementById
  InspectorController::profiles
Document::getElementsByClassName
  InspectorController::removeBreakpoint
Document::getElementsByName
  InspectorController::resumeDebugger
Document::getElementsByTagName
  InspectorController::search
Document::getElementsByTagNameNS
  InspectorController::searchingForNode
Document::getOverrideStyle
  InspectorController::setAttachedWindowHeight
Document::getSelection
  InspectorController::setPauseOnExceptions
Document::importNode
  InspectorController::setSetting
Document::queryCommandEnabled
  InspectorController::setting
Document::queryCommandIndeterm
  InspectorController::startProfiling
Document::queryCommandState
  InspectorController::stepIntoStatementInDebugger
Document::queryCommandSupported
  InspectorController::stepOutOfFunctionInDebugger
Document::queryCommandValue
  InspectorController::stepOverStatementInDebugger
Document::querySelector
  InspectorController::stopProfiling
Document::querySelectorAll
  InspectorController::toggleNodeSearch
Document::resetWMLPageState
  InspectorController::windowUnloading
DocumentFragment::querySelector
  InspectorController::wrapCallback
DocumentFragment::querySelectorAll
  NamedNodeMap::getNamedItem
DOMCoreException::toString
  NamedNodeMap::getNamedItemNS
DOMImplementation::createCSSStyleSheet
  NamedNodeMap::item
DOMImplementation::createDocument
  NamedNodeMap::removeNamedItem
DOMImplementation::createDocumentType
  NamedNodeMap::removeNamedItemNS
DOMImplementation::createHTMLDocument
  NamedNodeMap::setNamedItem
DOMImplementation::hasFeature
  NamedNodeMap::setNamedItemNS
DOMStringList::contains
  Node::addEventListener
Element::blur
  Node::appendChild
Element::contains
  Node::cloneNode
Element::focus
  Node::compareDocumentPosition
Element::getAttribute
  Node::dispatchEvent
Element::getAttributeNode
  Node::hasAttributes
Element::getAttributeNodeNS
  Node::hasChildNodes
Element::getAttributeNS
  Node::insertBefore
Element::getBoundingClientRect
  Node::isDefaultNamespace
Element::getClientRects
  Node::isEqualNode
Element::getElementsByClassName
  Node::isSameNode
Element::getElementsByTagName
  Node::isSupported
Element::getElementsByTagNameNS
  Node::lookupNamespaceURI
Element::hasAttribute
  Node::lookupPrefix
Element::hasAttributeNS
  Node::normalize
Element::querySelector
  Node::removeChild
Element::querySelectorAll
  Node::removeEventListener
Element::removeAttribute
  Node::replaceChild
Element::removeAttributeNode
  NodeList::item
Element::removeAttributeNS
  PositionCallback::handleEvent
Element::scrollByLines
  PositionErrorCallback::handleEvent
Element::scrollByPages
  Text::replaceWholeText
Element::scrollIntoView
  Text::splitText

css

CSSMediaRule::deleteRule
  CSSStyleSheet::deleteRule
CSSMediaRule::insertRule
  CSSStyleSheet::insertRule
CSSPrimitiveValue::getCounterValue
  CSSStyleSheet::removeRule
CSSPrimitiveValue::getFloatValue
  CSSValueList::item
CSSPrimitiveValue::getRectValue
  CSSVariablesDeclaration::getVariableValue
CSSPrimitiveValue::getRGBColorValue
  CSSVariablesDeclaration::item
CSSPrimitiveValue::getStringValue
  CSSVariablesDeclaration::removeVariable
CSSPrimitiveValue::setFloatValue
  CSSVariablesDeclaration::setVariable
CSSPrimitiveValue::setStringValue
  WebKitCSSKeyframesRule::deleteRule
CSSRuleList::item
  WebKitCSSKeyframesRule::findRule
CSSStyleDeclaration::getPropertyCSSValue
  WebKitCSSKeyframesRule::insertRule
CSSStyleDeclaration::getPropertyPriority
  WebKitCSSMatrix::inverse
CSSStyleDeclaration::getPropertyShorthand
  WebKitCSSMatrix::multiply
CSSStyleDeclaration::getPropertyValue
  WebKitCSSMatrix::rotate
CSSStyleDeclaration::isPropertyImplicit
  WebKitCSSMatrix::rotateAxisAngle
CSSStyleDeclaration::item
  WebKitCSSMatrix::scale
CSSStyleDeclaration::removeProperty
  WebKitCSSMatrix::setMatrixValue
CSSStyleDeclaration::setProperty
  WebKitCSSMatrix::toString
CSSStyleSheet::addRule
  WebKitCSSMatrix::translate

events

Event::initEvent
  MessagePort::dispatchEvent
Event::preventDefault
  MessagePort::postMessage
Event::stopPropagation
  MessagePort::removeEventListener
EventException::toString
  MessagePort::start
EventListener::handleEvent
  MessagePort::startConversation
EventTarget::addEventListener
  MouseEvent::initMouseEvent
EventTarget::dispatchEvent
  MutationEvent::initMutationEvent
EventTarget::removeEventListener
  OverflowEvent::initOverflowEvent
KeyboardEvent::getModifierState
  ProgressEvent::initProgressEvent
KeyboardEvent::initKeyboardEvent
  TextEvent::initTextEvent
KeyboardEvent::initKeyboardEvent
  UIEvent::initUIEvent
MessageEvent::initMessageEvent
  WebKitAnimationEvent::initWebKitAnimationEvent
MessagePort::addEventListener
  WebKitTransitionEvent::initWebKitTransitionEvent
MessagePort::close
  WheelEvent::initWheelEvent

html

C | F | H | T | V
CanvasGradient::addColorStop
  HTMLCollection::tags
CanvasRenderingContext2D::arc
  HTMLDocument::captureEvents
CanvasRenderingContext2D::arcTo
  HTMLDocument::clear
CanvasRenderingContext2D::beginPath
  HTMLDocument::close
CanvasRenderingContext2D::bezierCurveTo
  HTMLDocument::hasFocus
CanvasRenderingContext2D::clearRect
  HTMLDocument::open
CanvasRenderingContext2D::clearShadow
  HTMLDocument::releaseEvents
CanvasRenderingContext2D::clip
  HTMLDocument::write
CanvasRenderingContext2D::closePath
  HTMLDocument::writeln
CanvasRenderingContext2D::createImageData
  HTMLElement::insertAdjacentElement
CanvasRenderingContext2D::createLinearGradient
  HTMLElement::insertAdjacentHTML
CanvasRenderingContext2D::createPattern
  HTMLElement::insertAdjacentText
CanvasRenderingContext2D::createRadialGradient
  HTMLEmbedElement::getSVGDocument
CanvasRenderingContext2D::drawImage
  HTMLFormElement::reset
CanvasRenderingContext2D::drawImageFromRect
  HTMLFormElement::submit
CanvasRenderingContext2D::fill
  HTMLFrameElement::getSVGDocument
CanvasRenderingContext2D::fillRect
  HTMLIFrameElement::getSVGDocument
CanvasRenderingContext2D::fillText
  HTMLInputElement::click
CanvasRenderingContext2D::getImageData
  HTMLInputElement::select
CanvasRenderingContext2D::isPointInPath
  HTMLInputElement::setSelectionRange
CanvasRenderingContext2D::lineTo
  HTMLMarqueeElement::start
CanvasRenderingContext2D::measureText
  HTMLMarqueeElement::stop
CanvasRenderingContext2D::moveTo
  HTMLMediaElement::canPlayType
CanvasRenderingContext2D::putImageData
  HTMLMediaElement::load
CanvasRenderingContext2D::quadraticCurveTo
  HTMLMediaElement::pause
CanvasRenderingContext2D::rect
  HTMLMediaElement::play
CanvasRenderingContext2D::restore
  HTMLObjectElement::getSVGDocument
CanvasRenderingContext2D::rotate
  HTMLOptionsCollection::add
CanvasRenderingContext2D::save
  HTMLOptionsCollection::item
CanvasRenderingContext2D::scale
  HTMLOptionsCollection::namedItem
CanvasRenderingContext2D::setAlpha
  HTMLOptionsCollection::remove
CanvasRenderingContext2D::setCompositeOperation
  HTMLSelectElement::add
CanvasRenderingContext2D::setFillColor
  HTMLSelectElement::item
CanvasRenderingContext2D::setLineCap
  HTMLSelectElement::namedItem
CanvasRenderingContext2D::setLineJoin
  HTMLSelectElement::remove
CanvasRenderingContext2D::setLineWidth
  HTMLTableElement::createCaption
CanvasRenderingContext2D::setMiterLimit
  HTMLTableElement::createTFoot
CanvasRenderingContext2D::setShadow
  HTMLTableElement::createTHead
CanvasRenderingContext2D::setStrokeColor
  HTMLTableElement::deleteCaption
CanvasRenderingContext2D::setTransform
  HTMLTableElement::deleteRow
CanvasRenderingContext2D::stroke
  HTMLTableElement::deleteTFoot
CanvasRenderingContext2D::strokeRect
  HTMLTableElement::deleteTHead
CanvasRenderingContext2D::strokeText
  HTMLTableElement::insertRow
CanvasRenderingContext2D::transform
  HTMLTableRowElement::deleteCell
CanvasRenderingContext2D::translate
  HTMLTableRowElement::insertCell
FileList::item
  HTMLTableSectionElement::deleteRow
HTMLAnchorElement::toString
  HTMLTableSectionElement::insertRow
HTMLButtonElement::click
  HTMLTextAreaElement::select
HTMLCanvasElement::getContext
  HTMLTextAreaElement::setSelectionRange
HTMLCanvasElement::toDataURL
  TimeRanges::end
HTMLCollection::item
  TimeRanges::start
HTMLCollection::namedItem
  VoidCallback::handleEvent

inspector

JavaScriptCallFrame::evaluate
 

offline

DOMApplicationCache::add
  DOMApplicationCache::remove
DOMApplicationCache::addEventListener
  DOMApplicationCache::removeEventListener
DOMApplicationCache::dispatchEvent
  DOMApplicationCache::swapCache
DOMApplicationCache::hasItem
  DOMApplicationCache::update

ranges

Range::cloneContents
  Range::isPointInRange
Range::cloneRange
  Range::selectNode
Range::collapse
  Range::selectNodeContents
Range::compareBoundaryPoints
  Range::setEnd
Range::compareNode
  Range::setEndAfter
Range::comparePoint
  Range::setEndBefore
Range::createContextualFragment
  Range::setStart
Range::deleteContents
  Range::setStartAfter
Range::detach
  Range::setStartBefore
Range::extractContents
  Range::surroundContents
Range::insertNode
  Range::toString
Range::intersectsNode
  RangeException::toString

storage

Database::changeVersion
  Storage::getItem
Database::transaction
  Storage::key
SQLResultSetRowList::item
  Storage::removeItem
SQLTransaction::executeSql
  Storage::setItem
Storage::clear
  StorageEvent::initStorageEvent

stylesheets

MediaList::appendMedium
  MediaList::item
MediaList::deleteMedium
  StyleSheetList::item

svg

E | S
ElementTimeControl::beginElement
  SVGPathElement::getPathSegAtLength
ElementTimeControl::beginElementAt
  SVGPathElement::getPointAtLength
ElementTimeControl::endElement
  SVGPathElement::getTotalLength
ElementTimeControl::endElementAt
  SVGPathSegList::appendItem
SVGAngle::convertToSpecifiedUnits
  SVGPathSegList::clear
SVGAngle::newValueSpecifiedUnits
  SVGPathSegList::getItem
SVGAnimationElement::getCurrentTime
  SVGPathSegList::initialize
SVGAnimationElement::getSimpleDuration
  SVGPathSegList::insertItemBefore
SVGAnimationElement::getStartTime
  SVGPathSegList::removeItem
SVGColor::setColor
  SVGPathSegList::replaceItem
SVGColor::setRGBColor
  SVGPoint::matrixTransform
SVGColor::setRGBColorICCColor
  SVGPointList::appendItem
SVGDocument::createEvent
  SVGPointList::clear
SVGElementInstance::addEventListener
  SVGPointList::getItem
SVGElementInstance::dispatchEvent
  SVGPointList::initialize
SVGElementInstance::removeEventListener
  SVGPointList::insertItemBefore
SVGElementInstanceList::item
  SVGPointList::removeItem
SVGException::toString
  SVGPointList::replaceItem
SVGFEGaussianBlurElement::setStdDeviation
  SVGStringList::appendItem
SVGFilterElement::setFilterRes
  SVGStringList::clear
SVGLength::convertToSpecifiedUnits
  SVGStringList::getItem
SVGLength::newValueSpecifiedUnits
  SVGStringList::initialize
SVGLengthList::appendItem
  SVGStringList::insertItemBefore
SVGLengthList::clear
  SVGStringList::removeItem
SVGLengthList::getItem
  SVGStringList::replaceItem
SVGLengthList::initialize
  SVGStylable::getPresentationAttribute
SVGLengthList::insertItemBefore
  SVGSVGElement::animationsPaused
SVGLengthList::removeItem
  SVGSVGElement::checkEnclosure
SVGLengthList::replaceItem
  SVGSVGElement::checkIntersection
SVGLocatable::getBBox
  SVGSVGElement::createSVGAngle
SVGLocatable::getCTM
  SVGSVGElement::createSVGLength
SVGLocatable::getScreenCTM
  SVGSVGElement::createSVGMatrix
SVGLocatable::getTransformToElement
  SVGSVGElement::createSVGNumber
SVGMarkerElement::setOrientToAngle
  SVGSVGElement::createSVGPoint
SVGMarkerElement::setOrientToAuto
  SVGSVGElement::createSVGRect
SVGMatrix::flipX
  SVGSVGElement::createSVGTransform
SVGMatrix::flipY
  SVGSVGElement::createSVGTransformFromMatrix
SVGMatrix::inverse
  SVGSVGElement::deselectAll
SVGMatrix::multiply
  SVGSVGElement::forceRedraw
SVGMatrix::rotate
  SVGSVGElement::getCurrentTime
SVGMatrix::rotateFromVector
  SVGSVGElement::getEnclosureList
SVGMatrix::scale
  SVGSVGElement::getIntersectionList
SVGMatrix::scaleNonUniform
  SVGSVGElement::pauseAnimations
SVGMatrix::skewX
  SVGSVGElement::setCurrentTime
SVGMatrix::skewY
  SVGSVGElement::suspendRedraw
SVGMatrix::translate
  SVGSVGElement::unpauseAnimations
SVGNumberList::appendItem
  SVGSVGElement::unsuspendRedraw
SVGNumberList::clear
  SVGSVGElement::unsuspendRedrawAll
SVGNumberList::getItem
  SVGTests::hasExtension
SVGNumberList::initialize
  SVGTextContentElement::getCharNumAtPosition
SVGNumberList::insertItemBefore
  SVGTextContentElement::getComputedTextLength
SVGNumberList::removeItem
  SVGTextContentElement::getEndPositionOfChar
SVGNumberList::replaceItem
  SVGTextContentElement::getExtentOfChar
SVGPaint::setPaint
  SVGTextContentElement::getNumberOfChars
SVGPaint::setUri
  SVGTextContentElement::getRotationOfChar
SVGPathElement::createSVGPathSegArcAbs
  SVGTextContentElement::getStartPositionOfChar
SVGPathElement::createSVGPathSegArcRel
  SVGTextContentElement::getSubStringLength
SVGPathElement::createSVGPathSegClosePath
  SVGTextContentElement::selectSubString
SVGPathElement::createSVGPathSegCurvetoCubicAbs
  SVGTransform::setMatrix
SVGPathElement::createSVGPathSegCurvetoCubicRel
  SVGTransform::setRotate
SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs
  SVGTransform::setScale
SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel
  SVGTransform::setSkewX
SVGPathElement::createSVGPathSegCurvetoQuadraticAbs
  SVGTransform::setSkewY
SVGPathElement::createSVGPathSegCurvetoQuadraticRel
  SVGTransform::setTranslate
SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs
  SVGTransformList::appendItem
SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel
  SVGTransformList::clear
SVGPathElement::createSVGPathSegLinetoAbs
  SVGTransformList::consolidate
SVGPathElement::createSVGPathSegLinetoHorizontalAbs
  SVGTransformList::createSVGTransformFromMatrix
SVGPathElement::createSVGPathSegLinetoHorizontalRel
  SVGTransformList::getItem
SVGPathElement::createSVGPathSegLinetoRel
  SVGTransformList::initialize
SVGPathElement::createSVGPathSegLinetoVerticalAbs
  SVGTransformList::insertItemBefore
SVGPathElement::createSVGPathSegLinetoVerticalRel
  SVGTransformList::removeItem
SVGPathElement::createSVGPathSegMovetoAbs
  SVGTransformList::replaceItem
SVGPathElement::createSVGPathSegMovetoRel
 

threads

Worker::addEventListener
  WorkerContext::dispatchEvent
Worker::dispatchEvent
  WorkerContext::importScripts
Worker::postMessage
  WorkerContext::postMessage
Worker::removeEventListener
  WorkerContext::removeEventListener
Worker::terminate
  WorkerContext::setInterval
WorkerContext::addEventListener
  WorkerContext::setTimeout
WorkerContext::clearInterval
  WorkerLocation::toString
WorkerContext::clearTimeout
 

traversal

NodeFilter::acceptNode
  TreeWalker::nextNode
NodeIterator::detach
  TreeWalker::nextSibling
NodeIterator::nextNode
  TreeWalker::parentNode
NodeIterator::previousNode
  TreeWalker::previousNode
TreeWalker::firstChild
  TreeWalker::previousSibling
TreeWalker::lastChild
 

view

ClientRectList::item
 

window

Console::assert
  DOMWindow::find
Console::count
  DOMWindow::focus
Console::debug
  DOMWindow::getComputedStyle
Console::dir
  DOMWindow::getMatchedCSSRules
Console::dirxml
  DOMWindow::getSelection
Console::error
  DOMWindow::moveBy
Console::group
  DOMWindow::moveTo
Console::groupEnd
  DOMWindow::open
Console::info
  DOMWindow::openDatabase
Console::log
  DOMWindow::postMessage
Console::profile
  DOMWindow::print
Console::profileEnd
  DOMWindow::prompt
Console::time
  DOMWindow::releaseEvents
Console::timeEnd
  DOMWindow::removeEventListener
Console::trace
  DOMWindow::resizeBy
Console::warn
  DOMWindow::resizeTo
DOMSelection::addRange
  DOMWindow::scroll
DOMSelection::collapse
  DOMWindow::scrollBy
DOMSelection::collapseToEnd
  DOMWindow::scrollTo
DOMSelection::collapseToStart
  DOMWindow::setInterval
DOMSelection::containsNode
  DOMWindow::setTimeout
DOMSelection::deleteFromDocument
  DOMWindow::showModalDialog
DOMSelection::empty
  DOMWindow::stop
DOMSelection::extend
  DOMWindow::toString
DOMSelection::getRangeAt
  DOMWindow::webkitConvertPointFromNodeToPage
DOMSelection::modify
  DOMWindow::webkitConvertPointFromPageToNode
DOMSelection::removeAllRanges
  History::back
DOMSelection::selectAllChildren
  History::forward
DOMSelection::setBaseAndExtent
  History::go
DOMSelection::setPosition
  Location::assign
DOMSelection::toString
  Location::reload
DOMWindow::addEventListener
  Location::replace
DOMWindow::alert
  Location::toString
DOMWindow::atob
  Location::valueOf
DOMWindow::blur
  MimeTypeArray::item
DOMWindow::btoa
  MimeTypeArray::namedItem
DOMWindow::captureEvents
  Navigator::javaEnabled
DOMWindow::clearInterval
  Plugin::item
DOMWindow::clearTimeout
  Plugin::namedItem
DOMWindow::close
  PluginArray::item
DOMWindow::confirm
  PluginArray::namedItem
DOMWindow::dispatchEvent
  PluginArray::refresh

xml

XMLHttpRequest::abort
  XMLHttpRequestUpload::addEventListener
XMLHttpRequest::addEventListener
  XMLHttpRequestUpload::dispatchEvent
XMLHttpRequest::dispatchEvent
  XMLHttpRequestUpload::removeEventListener
XMLHttpRequest::getAllResponseHeaders
  XSLTProcessor::clearParameters
XMLHttpRequest::getResponseHeader
  XSLTProcessor::getParameter
XMLHttpRequest::open
  XSLTProcessor::importStylesheet
XMLHttpRequest::overrideMimeType
  XSLTProcessor::removeParameter
XMLHttpRequest::removeEventListener
  XSLTProcessor::reset
XMLHttpRequest::send
  XSLTProcessor::setParameter
XMLHttpRequest::setRequestHeader
  XSLTProcessor::transformToDocument
XMLHttpRequestException::toString
  XSLTProcessor::transformToFragment

xpath

DOMParser::parseFromString
  XPathException::toString
XMLSerializer::serializeToString
  XPathExpression::evaluate
XPathEvaluator::createExpression
  XPathNSResolver::lookupNamespaceURI
XPathEvaluator::createNSResolver
  XPathResult::iterateNext
XPathEvaluator::evaluate
  XPathResult::snapshotItem

Other References

Header Index
Constants, Globals, and Macros Index