Image is not defined
Reported by nickg | 2010-03-15 11:47:20 UTC | in 1.2.x
looks like Image is missing in envjs.
Image is a weirdo in the DOM, since it actually has a constructor, and doesn't need an OwnerDocument.
For ref, https://developer.mozilla.org/En/DOM/Image
$ ./tester.sh
Rhino 1.7 release 2 2009 03 22
js> load("client9-env-js/dist/env.rhino.js");
[ Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.6.2; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.0.6 ]
js> Image
js: "<stdin>", line 3: uncaught JavaScript runtime exception: ReferenceError: "Image" is not defined.
at <stdin>:3
js>
Comments and changes to this ticket
-

nickg 2010-03-15 11:57:36 UTC
In my envjs-like thing, I did something like the following:
// img // http://dev.w3.org/html5/spec/Overview.html#the-img-element Image = function(width, height) { // Image can free form create nodes //var tmp= window.document.createElement('img'); this._dom = tmp._dom; this.width = width; this.height = height; this.src = null; }; Image.prototype = HTMLImageElement.prototype; -

nickg 2010-03-15 11:57:58 UTC
- Tag changed from image to htmlimageelement, image
-

nickg 2010-03-15 19:19:46 UTC
- Assigned user set to Thatcher
Patch:
http://github.com/client9/env-js/commit/0f09339ee05702558f14ecee987...this has unit tests even!
-

Thatcher 2010-03-16 16:46:16 UTC
Great work. Im going to just stay up and apply as many of these as I can
tonight. -

Thatcher 2010-03-16 19:38:54 UTC
thanks again for the patch and even more so the tests. the tests helped
show that the Option interface hasnt been committed. I adjusted the tests
and patch to apply specifically to the ticket issue. I'll close the ticket
with a speciicf link to the commit. -

Thatcher 2010-03-17 03:01:50 UTC
- Milestone set to 1.2.x
- Tag changed from htmlimageelement, image to htmlimageelement, image, option
- State changed from new to resolved
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