diff options
Diffstat (limited to 'WebKit/chromium/src/WebElement.cpp')
-rw-r--r-- | WebKit/chromium/src/WebElement.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp index 3f13ee1..d0a0862 100644 --- a/WebKit/chromium/src/WebElement.cpp +++ b/WebKit/chromium/src/WebElement.cpp @@ -54,5 +54,38 @@ WebElement::operator WTF::PassRefPtr<Element>() const return PassRefPtr<Element>(static_cast<Element*>(m_private)); } +WebString WebElement::tagName() const +{ + return constUnwrap<Element>()->tagName(); +} + +bool WebElement::hasTagName(const WebString& tagName) const +{ + return equalIgnoringCase(constUnwrap<Element>()->tagName(), + tagName.operator WebCore::String()); +} + +bool WebElement::hasAttribute(const WebString& attrName) const +{ + return constUnwrap<Element>()->hasAttribute(attrName); +} + +WebString WebElement::getAttribute(const WebString& attrName) const +{ + return constUnwrap<Element>()->getAttribute(attrName); +} + +bool WebElement::setAttribute(const WebString& attrName, const WebString& attrValue) +{ + ExceptionCode exceptionCode = 0; + unwrap<Element>()->setAttribute(attrName, attrValue, exceptionCode); + return !exceptionCode; +} + +WebString WebElement::innerText() const +{ + return constUnwrap<Element>()->innerText(); +} + } // namespace WebKit |