[webkit-reviews] review denied: [Bug 4403] Script element doesn't
load if you set src when it is already in the document :
[Attachment 4724] Load script when src is set;
generate load event when loaded
bugzilla-request-daemon at opendarwin.org
bugzilla-request-daemon at opendarwin.org
Tue Nov 22 19:46:24 PST 2005
Darin Adler <darin at apple.com> has denied opendarwin.org at mitzpettel.com's
request for review:
Bug 4403: Script element doesn't load if you set src when it is already in the
document
http://bugzilla.opendarwin.org/show_bug.cgi?id=4403
Attachment 4724: Load script when src is set; generate load event when loaded
http://bugzilla.opendarwin.org/attachment.cgi?id=4724&action=edit
------- Additional Comments from Darin Adler <darin at apple.com>
This code looks good, but most of it is in the wrong function.
Code to respond to an attribute change should be in the parseMappedAttribute
function. For example, see HTMLImageElementImpl::parseMappedAttribute and note
its handling of srcAttr.
To test this you can try using setAttribute('src', URL) and you'll see it won't
work. The setSrc function has to be just a simple cover that calls
setAttribute.
The loadEvent half of this fix is separate, and looks fine; a separate bug
report and separate test would be a slightly better way to handle that.
More information about the webkit-reviews
mailing list