Bug 30131 - Make beforeload work with script elements
Summary: Make beforeload work with script elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 09:42 PDT by Dave Hyatt
Modified: 2009-10-06 10:38 PDT (History)
0 users

See Also:


Attachments
Patch (13.30 KB, patch)
2009-10-06 09:45 PDT, Dave Hyatt
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2009-10-06 09:42:18 PDT
This patch makes the beforeload event fire on script elements.
Comment 1 Dave Hyatt 2009-10-06 09:45:41 PDT
Created attachment 40727 [details]
Patch
Comment 2 Adam Roben (:aroben) 2009-10-06 10:02:53 PDT
Comment on attachment 40727 [details]
Patch

> +++ WebCore/dom/ScriptElement.h	(working copy)
> @@ -44,9 +44,10 @@ public:
>      virtual String languageAttributeValue() const = 0;
>      virtual String forAttributeValue() const = 0;
>  
> +    virtual bool dispatchBeforeLoadEvent(const String& sourceURL) = 0;
>      virtual void dispatchLoadEvent() = 0;
>      virtual void dispatchErrorEvent() = 0;
> -
> +    

Unneeded whitespace change here.

I think you could share the dispatchBeforeLoadEvent implementation by making it a static protected helper function on ScriptElement.

r=me
Comment 3 Dave Hyatt 2009-10-06 10:38:11 PDT
Fixed in r49194.