On Nov 23, 6:25 pm, Yel <[email protected]> wrote:
> continue with this topic.
>
> I wrote some scripts to try to loop all objects in the browser (say,
> firefox), and made it below :
>
> {{{
> <script type="text/javascript">
>
> function Hashtable()
...
> var vars = new Hashtable();

Just a suggestion, read up some on Javascript, say for example, Doug
Crockford's book "Javascript the Good Parts". That code looks like
Java...

> function takesnapshot()
> {
>     list = function(obj)
>     {
>         if(obj.toString() == 'vars') return; // exclude vars self.
>         vars.add(obj.toString(), obj.toString());

? I guess you meant to add p, obj[p].toString()?

>         for(var p in obj) list(p);

You are passing the field name in to list.

>     }
...
> However, it didn't output what I wanted. Moreover, the output differed
> between IE and firefox (or Chrome etc.)

Sure it will be different. Some the same some different.

> Is it caused by the single threading implementations of javascript?

Huh? No.
jjb

--

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