Object equivalence across jsd

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Object equivalence across jsd

John J Barton
In a call to jsd.enumerateScripts Firebug has a line like this:

if (script.functionObject.getWrappedValue() == fn) ...

But it is never true.  If I use:

if (script.functionObject.getWrappedValue().name == fn.name) ...

then I get a match and the script.tag is the one that was created
with the function name fn.name.

Since few function have "name" properties, my test, while more
successful than Firebug's is not very useful.

The objective is to retrieve the script matching a Function object.

Any suggestions?
Thanks,
John.
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger