Google Groups Home
Help | Sign in
Changes to the 'console' object in Firebug 1.2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 27 - Collapse all   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
John J Barton  
View profile
 More options Apr 2, 1:03 pm
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 2 Apr 2008 10:03:25 -0700 (PDT)
Local: Wed, Apr 2 2008 1:03 pm
Subject: Changes to the 'console' object in Firebug 1.2
Firebug 1.2 will require users of the 'console' object, as in
console.log() etc, to issue
loadFirebugConsole()
before the first use of the 'console' object.  Since you are going to
hate this anyway, what do you think about also changing the name of
the 'console' object, eg 'fbConsole' or firebug.console or other ways
to reduce potential collisions?

See also:http://code.google.com/p/fbug/issues/detail?id=109

John.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zacky Ma  
View profile
 More options Apr 2, 1:07 pm
From: "Zacky Ma" <march...@gmail.com>
Date: Thu, 3 Apr 2008 01:07:59 +0800
Local: Wed, Apr 2 2008 1:07 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

I think fb.console is acceptable...

On Thu, Apr 3, 2008 at 1:03 AM, John J Barton <johnjbar...@johnjbarton.com>
wrote:

> Firebug 1.2 will require users of the 'console' object, as in
> console.log() etc, to issue
> loadFirebugConsole()
> before the first use of the 'console' object.  Since you are going to
> hate this anyway, what do you think about also changing the name of
> the 'console' object, eg 'fbConsole' or firebug.console or other ways
> to reduce potential collisions?

> See also:http://code.google.com/p/fbug/issues/detail?id=109

> John.

--
Zacky MA
www.marchbox.com

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Odvarko  
View profile
 More options Apr 2, 1:35 pm
From: Jan Odvarko <odva...@gmail.com>
Date: Wed, 2 Apr 2008 10:35:01 -0700 (PDT)
Local: Wed, Apr 2 2008 1:35 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2
I definitely like the idea of having single namespace with all
Firebug's services attached. Even if this breaks backward
compatibility I would do it rather sooner than later (I think
it's actually a must).

I don't have strong opinion on this, but I would prefer "firebug" as
the name so, e.g. firebug.console

Honza

On Apr 2, 7:03 pm, John J Barton <johnjbar...@johnjbarton.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Kahn  
View profile
 More options Apr 2, 1:45 pm
From: "Mark Kahn" <cwol...@gmail.com>
Date: Wed, 2 Apr 2008 10:45:33 -0700
Local: Wed, Apr 2 2008 1:45 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

I think that if this is going to be done I'd prefer "firebug", "fireBug" or
"Firebug" to be the namespace, preferably the first one.  Why does
loadFirebugConsole() need to be called?  Couldn't you do something like:

firebug.console = function(){
   loadFirebugConsole();
   firebug.console = firebug._console;
   firebug.console.call(this, arguments);

}

firebug._console = function(){ // real function }

Adding a namespace is one thing, requiring another call is another.  One of
the great things about firebug is that I can just type "console.log"
anywhere  :-)

As for the bug that was filed, arguing that Safari has its own console
object is just rediculous.  Firebug is a firefox-specific extension and any
calls to firebug in code NEED to be removed before the code is made live.
The argument boils down to "Well I need to remove console for IE, Opera and
any other browser, but I don't want to remove it for safari"...???

I wonder how many people, besides myself, are going to be forced to write:

if(window.firebug){
   window.console = firebug.console;
   window.trace = firebug.trace;
   // etc

}

Could you please make sure that these will work?  :-)

-Mark

On Wed, Apr 2, 2008 at 10:03 AM, John J Barton <johnjbar...@johnjbarton.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile
 More options Apr 2, 2:49 pm
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 2 Apr 2008 11:49:59 -0700 (PDT)
Local: Wed, Apr 2 2008 2:49 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

On Apr 2, 10:45 am, "Mark Kahn" <cwol...@gmail.com> wrote:

> I think that if this is going to be done I'd prefer "firebug", "fireBug" or
> "Firebug" to be the namespace, preferably the first one.  Why does
> loadFirebugConsole() need to be called?  Couldn't you do something like:

> firebug.console = function(){
>    loadFirebugConsole();
>    firebug.console = firebug._console;
>    firebug.console.call(this, arguments);

> }

The line
  firebug.console = firebug._console;
will cause infinite recursion, calling your function again (assuming
you meant to define a getter rather than a function).

John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile
 More options Apr 2, 3:12 pm
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 2 Apr 2008 12:12:05 -0700 (PDT)
Local: Wed, Apr 2 2008 3:12 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

On Apr 2, 11:49 am, John J Barton <johnjbar...@johnjbarton.com> wrote:

> On Apr 2, 10:45 am, "Mark Kahn" <cwol...@gmail.com> wrote:

> > I think that if this is going to be done I'd prefer "firebug", "fireBug" or
> > "Firebug" to be the namespace, preferably the first one.  Why does
> > loadFirebugConsole() need to be called?  Couldn't you do something like:

> > firebug.console = function(){
> >    loadFirebugConsole();
> >    firebug.console = firebug._console;
> >    firebug.console.call(this, arguments);

> > }

Sorry I should say...I tried that so I know that:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Kahn  
View profile
 More options Apr 2, 3:44 pm
From: "Mark Kahn" <cwol...@gmail.com>
Date: Wed, 2 Apr 2008 12:44:38 -0700
Local: Wed, Apr 2 2008 3:44 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

Unless running it via a plugin changes the functionality:

<script>
function loadFirebugConsole(){
    alert('loadFirebugConsole');
    // do stuff here

}

var firebug = {};
firebug.console = {
    init: function(){
        loadFirebugConsole();
        firebug.console = firebug._console;
    },
    log: function(){
        this.init();
        firebug.console.log.apply(this, arguments);
    }
};

firebug._console = {
    log: function(){
        alert('real console.log called with '+arguments.length+' arguments:
1:'+arguments[0]);
    }

};

firebug.console.log('this is a test');
</script>

-Mark

On Wed, Apr 2, 2008 at 12:12 PM, John J Barton <johnjbar...@johnjbarton.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile
 More options Apr 2, 4:11 pm
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 2 Apr 2008 13:11:15 -0700 (PDT)
Local: Wed, Apr 2 2008 4:11 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2
Yes, but you can't add the script to the page because you can't get
control after the document is valid but before any javascript (which
could use the console) can run. For example, if the first tag in the
page is <script> console.log('ff'): ...

You can eval an object or function, but the environment will be
evalInSandbox, so you won't have the same Javascript world as the
page.  So you can't load the whole console, just a loader to do it
later.

So that leaves you with needing a function call to trigger the "do it
later" bit.

It could be "loadFirebugConsole()" as I propose. Or it could be
window.console using a getter method.  I guess it could be
firebug.__defineGetter__("console", function() {

}

On Apr 2, 12:44 pm, "Mark Kahn" <cwol...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Kahn  
View profile
 More options Apr 2, 4:15 pm
From: "Mark Kahn" <cwol...@gmail.com>
Date: Wed, 2 Apr 2008 13:15:50 -0700
Local: Wed, Apr 2 2008 4:15 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

I guess I'm confused as to why the loadFirebugConsole function is suddenly
needed when it never has been before?

-Mark

On Wed, Apr 2, 2008 at 1:11 PM, John J Barton <johnjbar...@johnjbarton.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile
 More options Apr 2, 4:26 pm
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 2 Apr 2008 13:26:43 -0700 (PDT)
Local: Wed, Apr 2 2008 4:26 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2

On Apr 2, 1:11 pm, John J Barton <johnjbar...@johnjbarton.com> wrote:

    if (firebug._console) return firebug._console;
    firebug._console = loadFirebugConsole();


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile
 More options Apr 2, 4:27 pm
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 2 Apr 2008 13:27:19 -0700 (PDT)
Local: Wed, Apr 2 2008 4:27 pm
Subject: Re: Changes to the 'console' object in Firebug 1.2
Because of changes in the way extensions interact with web pages in
FF3.

On Apr 2, 1:15 pm, "Mark Kahn" <cwol...@gmail.com> wrote: