setting Image.src explodes
Reported by nickg | March 17th, 2010 @ 04:42 PM
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 March 17th, 2010 @ 04:43 PM
- Assigned user set to Thatcher
and here it is...
http://github.com/client9/env-js/commit/e56ba7b8e05f27bc5a7aa98ade4...
-
nickg March 21st, 2010 @ 12:05 PM
- Tag set to htmlimageelement
- Assigned user changed from Thatcher to nickg
-
nickg March 21st, 2010 @ 12:17 PM
- 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