All good ideas, thanks guys.
Watching in firebug is a good option, but here is the solution I was
looking for:
console.exec = function(s) {
console.log(eval(s));
}
console.exec('var obj = oObject');
Thanks all who contributed.
On Jun 10, 12:19 pm, Hernan Rodriguez Colmeiro <[email protected]>
wrote:
> On Sat, Jun 6, 2009 at 20:13, Alexander
>
> Podgorny<[email protected]> wrote:
> > The idea is to be able to refer to the outputted objects through the
> > command line.
> [...]
> > What is different is this:
> > in command line I want to be able to refer to the object "obj" in the
> > following manner:
> >>> obj.myprop
> > Which would output: "hello".
>
> You can do what you're describing if you set "obj" as a global
> variable. There are two ways for doing so (at least that I know):
>
> 1) Set the variable as a property of the window object: window.obj =
> {myprop: 'hello'};
> 2) Set the variable without the "var" keyword. This is a shorthand for
> the method 1.
>
> Hernán
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---