In case of Chrome devtools I basically get hold of the RemoteObject. I draw the JSOD based on that. It is my understanding the equivalent of that in Firebug is ObjectReference. It should be very easy to port the Chrome integration code once I get hold of the ObjectReference because it is roughly similar to RemoteObject.
Sooo... my question is, how do I get hold of the ObjectReference in my context menu click callback?
Any tips are appreciated. Once done I will contribute the extension to Firebug community.
Regards,
Sandip
I am trying to integrate my JavaScript Object Diagram (JSOD) with Firebug Watches panel. I have done a similar integration with Chrome devtools. For details see:
http://sandipchitale.blogspot.com/2014/03/javascript-object-diagram-integration.htmlI have started my firebug extension and got to the point of showing a context menu on values in Watches panel. See:
In case of Chrome devtools I basically get hold of the RemoteObject. I draw the JSOD based on that. It is my understanding the equivalent of that in Firebug is ObjectReference. It should be very
easy to port the Chrome integration code once I get hold of the ObjectReference because it is roughly similar to RemoteObject.
Sooo... my question is, how do I get hold of the ObjectReference in my context menu click callback?
onContextMenu: function(items, object, target, context, panel, popup)
Hi Jan,Thanks for the response. After a little bit of debugging I figured out that the 'object' argument is a JavaScript object (possibly a wrapper - due to a different JavaScript context)
and that for JSOD purposes I can use it as such. So I am on my way to finish the implementation. I have also added JSOD Panel as a top level panel and and am able to switch to it when the context menu is clicked. Now it is simply a matter of populating the diagram.
Hi Honza,
Thanks for trying it out. I am not seeing these errors. What exact versions of Firebug and Firefox are you using. I will try to track these down if I can. Seem to be coming from firebug itself?
BTW I wrote the FireJSOD for Firebug 1.12.8 to be useful to most people. I will port it for Firebug 2.0 Beta. Where is the documentation for the changes from the point of view of extension writers that I can reference?
http://getfirebug.com/wiki/index.php/Extension_Migration
Please let us know what kind of info you'd like to see
there and we'll provide it.
Honza
Everyting worked. So probably no change is required.
On Monday, April 14, 2014 7:35:35 PM UTC+2, Sandip Chitale wrote:Hi Honza,
Thanks for trying it out. I am not seeing these errors. What exact versions of Firebug and Firefox are you using. I will try to track these down if I can. Seem to be coming from firebug itself?
I am testing with Firefox 28 and Firebug 1.12.8
But, the problem came actually from Firebug, fixed at:
https://github.com/firebug/firebug/commit/34f747662f1a512e18e1e7ea4d52a9a90abddfd3
(also fixed in Firebug 2)
> In the context menu you will see a JavaScript Object Diagram , click on it. That will load the
> object into JSOD panel and select it.
Yep, works for me, very nice!
- Scrollbars in the JSOD panel doesn't seem to cover the entire diagram area
- Should the context menu item be available even in the DOM panel?
- Why the debugger needs to be paused?
I am seeing other error in our Firebug Tracing Console (FBTrace)
Console Service ERROR [JavaScript Error: "TypeError: constructorObject is undefined" {file: "chrome://firejsod/content/JSODPanel.js" line: 454}] [JavaScript Error: "TypeError: constructorObject is undefined" {file: "chrome://firejsod/content/JSODPanel.js" line: 454}]
You can install FBTrace (it's Firefox/Firebug extension and it's part of Firebug source repo) to see it.
Read more here:
https://getfirebug.com/wiki/index.php/FBTrace
Fixed "TypeError: constructorObject is undefined".
snip