Bug 27623 - Video elements fires another "load" event when attached to DOM
Summary: Video elements fires another "load" event when attached to DOM
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Eric Carlson
Depends on:
Reported: 2009-07-23 13:27 PDT by Charles Ying
Modified: 2009-07-30 09:06 PDT (History)
2 users (show)

See Also:

test reduction (651 bytes, text/html)
2009-07-23 13:27 PDT, Charles Ying
no flags Details
proposed patch (3.91 KB, patch)
2009-07-30 08:30 PDT, Eric Carlson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Ying 2009-07-23 13:27:55 PDT
Created attachment 33363 [details]
test reduction

When a video element not attached to the DOM is loaded first (prior to attachment), then attached, a second "load" event is fired on the video element.

This manifests itself as a repeated load event in the sample code which adds the video to the DOM only after the video has finished loading.

This is illustrated by commenting out the "jQuery("#container").append(video);" line from the attached reduction.
Comment 1 Eric Carlson 2009-07-29 15:39:00 PDT
Looks like you forgot to attach the test case.
Comment 2 Charles Ying 2009-07-29 15:47:35 PDT
I think I attached it, it appears in the attachments as "test reduction"
Comment 3 Eric Carlson 2009-07-30 08:30:05 PDT
Created attachment 33784 [details]
proposed patch
Comment 4 Eric Carlson 2009-07-30 09:06:45 PDT