On Dec 18, 9:10 am, Dominik Deobald <[email protected]> wrote:
> It may not have been the answer I have been looking for, but that
> doesn't mean that it isn't the solution to my problem ;)
>
> I'm using jQuery in that page and in the end that's causing my
> problem.
>
> Console works here:
>   console.log('x');

At global scope 'console' means 'this.console' means 'window.console'.

>   $(function() {
>     // do some stuff
>   });
>
> Console DOES NOT work here:
>   $(function() {
>     console.log('x');

At function scope 'console' means 'this.console' means whatever '$()-
decides.console'

>     // do some stuff
>   });
>
> Everything back to working:
>   $(function() {
>     window.console.log('x');

At function scope 'window.console' means

>     // do some stuff
>   });
>
> Seems to be some kind of scope problem that I didn't expect.


Yep, console is just a property of window, not reserved keyword.

jjb

>
> Thanks all, helped me a lot!

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to