summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLScriptElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLScriptElement.cpp')
-rw-r--r--WebCore/html/HTMLScriptElement.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/WebCore/html/HTMLScriptElement.cpp b/WebCore/html/HTMLScriptElement.cpp
index 86cc3a2..636c579 100644
--- a/WebCore/html/HTMLScriptElement.cpp
+++ b/WebCore/html/HTMLScriptElement.cpp
@@ -24,6 +24,7 @@
#include "HTMLScriptElement.h"
#include "Document.h"
+#include "Event.h"
#include "EventNames.h"
#include "HTMLNames.h"
#include "MappedAttribute.h"
@@ -70,6 +71,8 @@ void HTMLScriptElement::parseMappedAttribute(MappedAttribute* attr)
handleSourceAttribute(m_data, attr->value());
else if (attrName == onloadAttr)
setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onbeforeloadAttr)
+ setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attr));
else
HTMLElement::parseMappedAttribute(attr);
}
@@ -216,18 +219,18 @@ String HTMLScriptElement::forAttributeValue() const
{
return getAttribute(forAttr).string();
}
-
+
void HTMLScriptElement::dispatchLoadEvent()
{
ASSERT(!m_data.haveFiredLoadEvent());
m_data.setHaveFiredLoadEvent(true);
- dispatchEvent(eventNames().loadEvent, false, false);
+ dispatchEvent(Event::create(eventNames().loadEvent, false, false));
}
void HTMLScriptElement::dispatchErrorEvent()
{
- dispatchEvent(eventNames().errorEvent, true, false);
+ dispatchEvent(Event::create(eventNames().errorEvent, true, false));
}
}