diff options
Diffstat (limited to 'Source/WebCore/html/HTMLScriptElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLScriptElement.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/WebCore/html/HTMLScriptElement.cpp b/Source/WebCore/html/HTMLScriptElement.cpp index 8e708d1..b56b375 100644 --- a/Source/WebCore/html/HTMLScriptElement.cpp +++ b/Source/WebCore/html/HTMLScriptElement.cpp @@ -58,6 +58,13 @@ void HTMLScriptElement::childrenChanged(bool changedByParser, Node* beforeChange HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); } +void HTMLScriptElement::attributeChanged(Attribute* attr, bool preserveDecls) +{ + if (attr->name() == asyncAttr) + handleAsyncAttribute(); + HTMLElement::attributeChanged(attr, preserveDecls); +} + void HTMLScriptElement::parseMappedAttribute(Attribute* attr) { const QualifiedName& attrName = attr->name(); @@ -102,6 +109,17 @@ void HTMLScriptElement::setText(const String &value) appendChild(document()->createTextNode(value.impl()), ec); } +void HTMLScriptElement::setAsync(bool async) +{ + setBooleanAttribute(asyncAttr, async); + handleAsyncAttribute(); +} + +bool HTMLScriptElement::async() const +{ + return fastHasAttribute(asyncAttr) || forceAsync(); +} + KURL HTMLScriptElement::src() const { return document()->completeURL(sourceAttributeValue()); |