Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Image is not defined

#111

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>

Reported by nickg · March 15th, 2010 @ 11:47 AM

State: resolved
Milestone: 1.2.x
Assigned to: Thatcher Thatcher

Activity

  1. nickg
    nickg

    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;
    

    March 15th, 2010 @ 11:57 AM

  2. nickg
    nickg
    • Tag changed from image to htmlimageelement, image

    March 15th, 2010 @ 11:57 AM

  3. nickg
  4. Thatcher
    Thatcher

    Great work. Im going to just stay up and apply as many of these as I can
    tonight.

    March 16th, 2010 @ 04:46 PM

  5. Thatcher
    Thatcher

    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.

    March 16th, 2010 @ 07:38 PM

  6. Thatcher
    Thatcher
    • Milestone set to 1.2.x
    • Tag changed from htmlimageelement, image to htmlimageelement, image, option
    • State changed from new to resolved

    March 17th, 2010 @ 03:01 AM

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.