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.

There was a problem

You must be a member of this account.

Leaking 'key' into the global scope

#78

It looks like 'key' is being leaked into the global scope.

We should probably change this to a getter.

Reported by Andor Salga · November 27th, 2010 @ 10:40 PM

State: checked-in
Milestone: 0.5
Assigned to: aSydiK aSydiK

Activity

  1. aSydiK
  2. aSydiK
    aSydiK

    I'm not exactly sure if this fixed it... however, I have a test called leakedKey and on the page window.key is alerted as an HTMLElement and not a number. Let me know if this is what you're looking for.

    December 9th, 2010 @ 11:15 PM

  3. Andor Salga
    Andor Salga
    • State changed from review-requested to review-needs-work

    Alerting 'key' should produce a JS error since it shouldn't exist in the user's script.

    Maybe we can have the user's key press callback be passed in an argument?

    December 28th, 2010 @ 10:17 PM

  4. aSydiK
    aSydiK
    • State changed from review-needs-work to review-requested

    checked the example with today's minefield nightly... got an undefined for

    function keyDown(){
    document.getElementById('key').innerHTML = ps.key; alert(window.key); }

    so I think it's working as intended now?

    January 20th, 2011 @ 07:01 PM

  5. Andor Salga
    Andor Salga
    • State changed from review-requested to checked-in

    February 9th, 2011 @ 10:56 PM

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.