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.

FAIL (31) [core] Make sure $ was reverted. expected: undefined actual: $

#34

this is probably an error loading inline script?

Reported by Thatcher · February 17th, 2009 @ 05:55 AM

State: resolved
Milestone: 1.0 Release
Assigned to: Thatcher Thatcher

Activity

  1. Thatcher
    Thatcher

    related

    FAIL (33) [core] Make sure jQuery was reverted. expected: undefined actual: jQuery FAIL (34) [core] Make sure $ was reverted. expected: undefined actual: $

    February 17th, 2009 @ 06:08 AM

  2. Thatcher
    Thatcher
    • Milestone set to 1.0 Release
    • State changed from new to open
    • Assigned user set to Thatcher

    This is a more difficult problem than I hoped. It appears that setting a property on the window does not make it accessible to the global scope.

    blah.

    heres how we have it set up now.. its at the top of the closure for everything window...

    
    // The Window Object
    var __this__ = this;
    this.__defineGetter__('window', function(){
      return __this__;
    });
    try{
    (function($w, $env, $policy){
    

    so the idea being window is an alias for the global 'this'.

    but if I do

    
    window.$ = foo;  print($);  
    

    -> undefined

    doh; any ideas?

    February 17th, 2009 @ 12:25 PM

  3. Thatcher
    Thatcher

    I take that back, I added a unit test to show this is true. I believe the error is in the timing of the inline script

    
    <script>var jQuery = "jQuery", $ = "$"; // For testing .noConflict()</script>
    

    February 17th, 2009 @ 12:46 PM

  4. Thatcher
    Thatcher
    • State changed from open to resolved

    ok closes, was side effect of previous commit where writeToTempFile caused inline scripts to not load correctly.

    February 17th, 2009 @ 01:41 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.