setting Image.src explodes
Reported by nickg | 2010-03-17 16:42:08 UTC
image.js
set src(value){
this.setAttribute('src', value);
var event = document.createEvent();
event.initEvent("load");
this.dispatchEvent( event, false );
},
The document.createEvent(); explodes since you need
an argument (e.g. 'Events').
Also according to HTML5 spec, if '' is passed in as source, an error event is suppose to happen.
Patch coming....
Comments and changes to this ticket
-

nickg 2010-03-17 16:43:35 UTC
- Assigned user set to Thatcher
and here it is...
http://github.com/client9/env-js/commit/e56ba7b8e05f27bc5a7aa98ade4...
-

nickg 2010-03-21 12:05:52 UTC
- Tag set to htmlimageelement
- Assigned user changed from Thatcher to nickg
-

nickg 2010-03-21 12:17:11 UTC
- State changed from new to resolved
Likely more work will be needed, but for the time being this is resolved with:
http://github.com/thatcher/env-js/commit/988037d4ab020ae41a87f0885d...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
a javascript browser environment