diff options
Diffstat (limited to 'WebCore/html/HTMLScriptElement.cpp')
-rw-r--r-- | WebCore/html/HTMLScriptElement.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/WebCore/html/HTMLScriptElement.cpp b/WebCore/html/HTMLScriptElement.cpp index 4744b34..86cc3a2 100644 --- a/WebCore/html/HTMLScriptElement.cpp +++ b/WebCore/html/HTMLScriptElement.cpp @@ -26,6 +26,8 @@ #include "Document.h" #include "EventNames.h" #include "HTMLNames.h" +#include "MappedAttribute.h" +#include "ScriptEventListener.h" #include "Text.h" namespace WebCore { @@ -67,7 +69,7 @@ void HTMLScriptElement::parseMappedAttribute(MappedAttribute* attr) if (attrName == srcAttr) handleSourceAttribute(m_data, attr->value()); else if (attrName == onloadAttr) - setInlineEventListenerForTypeAndAttribute(eventNames().loadEvent, attr); + setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr)); else HTMLElement::parseMappedAttribute(attr); } @@ -209,18 +211,23 @@ String HTMLScriptElement::languageAttributeValue() const { return getAttribute(languageAttr).string(); } + +String HTMLScriptElement::forAttributeValue() const +{ + return getAttribute(forAttr).string(); +} void HTMLScriptElement::dispatchLoadEvent() { ASSERT(!m_data.haveFiredLoadEvent()); m_data.setHaveFiredLoadEvent(true); - dispatchEventForType(eventNames().loadEvent, false, false); + dispatchEvent(eventNames().loadEvent, false, false); } void HTMLScriptElement::dispatchErrorEvent() { - dispatchEventForType(eventNames().errorEvent, true, false); + dispatchEvent(eventNames().errorEvent, true, false); } } |