Attributes Inspector (for developers)

Re: Attributes Inspector (for developers)

Postby morat » Sat Nov 16, 2013 6:32 pm

No errors in the browser console.

var _showFullTree = 0; // opens content document correctly
var _showFullTree = 1; // opens content document correctly
var _showFullTree = 2; // bug, opens chrome document

Thanks for the workaround.
morat
 
Posts: 946
Joined: Wed Dec 28, 2011 2:38 pm

Re: Attributes Inspector (for developers)

Postby Infocatcher » Sat Nov 16, 2013 8:35 pm

What about following code?
Code: Select all
var inspWin = window.openDialog(
   "chrome://inspector/content/",
   "_blank",
   "chrome,all,dialog=no",
   document
);
inspWin.addEventListener("load", function load() {
   inspWin.removeEventListener("load", load, false);
   setTimeout(function() {
      inspWin.inspector.getViewer("dom").showNodeInTree(content.document.documentElement);
   }, 1000);
}, false);

Should open DOM Inspector for browser's document and select root node of content document after 1 second.
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

Re: Attributes Inspector (for developers)

Postby Infocatcher » Sat Nov 16, 2013 8:40 pm

Oh, I probably found it. "View – Show Anonymous Content" should be checked.
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

Re: Attributes Inspector (for developers)

Postby morat » Sat Nov 16, 2013 9:45 pm

That code opens the tabbrowser element id="content" in the chrome document. If I check the "show anonymous content" option, then that code opens the root node near the stack element class="browserStack in the chrome document.

The following code opens the root node in the content document.

Code: Select all
inspectDOMNode(content.document.documentElement);
morat
 
Posts: 946
Joined: Wed Dec 28, 2011 2:38 pm

Re: Attributes Inspector (for developers)

Postby Infocatcher » Sat Nov 16, 2013 9:54 pm

morat wrote:If I check the "show anonymous content" option, then that code opens the root node near the stack element, i.e. class="browserStack", in the chrome document.
So, works correctly or not?
And what you see with Attributes Inspector + "_showFullTree = 2" and checked "show anonymous content"?

morat wrote:The following code opens the root node in the content document.

Code: Select all
inspectDOMNode(content.document.documentElement);
Yes, but this inspects node.ownerDocument and _showFullTree and _nodePosition options can't be applied in this case.
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

Re: Attributes Inspector (for developers)

Postby morat » Sat Nov 16, 2013 10:34 pm

Infocatcher wrote:So, works correctly or not?

I guess that code works like you said.

http://i43.tinypic.com/t0hqo8.jpg

Infocatcher wrote:And what you see with Attributes Inspector + "_showFullTree = 2" and checked "show anonymous content"?

The same as above. It opens the <p class="author"> element in the chrome document.
morat
 
Posts: 946
Joined: Wed Dec 28, 2011 2:38 pm

Re: Attributes Inspector (for developers)

Postby Infocatcher » Sun Nov 17, 2013 6:28 pm

morat wrote:
Infocatcher wrote:So, works correctly or not?

I guess that code works like you said.
Yes, this is exactly what "_showFullTree = 2" should do.
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

Re: Attributes Inspector (for developers)

Postby Infocatcher » Thu Jun 19, 2014 9:34 am

Attributes Inspector 0.6.3 (2014-06-19)
[+] Added Ctrl+W hotkey to inspect "window" object of current node.
[+] Show more details about document node.
[*] Slightly improved performance: remove previous tooltip's content directly before adding of new one.
[x] Correctly disable popup locker using Escape key (#12).
[*] Check all windows for already running Attributes Inspector.
[x] Added ability to force repaint tooltip in Firefox 29+ (in case of display issues "_forceRepaintTooltip" option) (#25).
[*] Simplify usage from Scratchpad (devtools.chrome.enabled = true + Environment – Browser): wrap code to not create global constants.
[x] Workaround to correctly work without inIFlasher (bug 1018324).
[+] Added "_maxTooltipWidth" option.
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

Re: Attributes Inspector (for developers)

Postby morat » Sun Nov 02, 2014 11:50 am

Is there any workaround to show the tooltip in Thunderbird?

I tried:

Code: Select all
var _forceRepaintTooltip = true;

Container box sometimes not displayed correctly
https://github.com/Infocatcher/Custom_Buttons/issues/25

That fix succeeds for me in Firefox, but fails in Thunderbird.

Attributes Inspector 0.6.3
Custom Buttons 0.0.5.8
DOM Inspector 2.0.14
Firefox ESR 31.2.0
Thunderbird 31.2.0 with a fresh profile
Windows 7 SP1 32-bit
morat
 
Posts: 946
Joined: Wed Dec 28, 2011 2:38 pm

Re: Attributes Inspector (for developers)

Postby Infocatcher » Sun Nov 02, 2014 5:34 pm

morat wrote:That fix succeeds for me in Firefox, but fails in Thunderbird.

The same for me with Thunderbird 31.2.0 (and Windows 7 SP1 32-bit with classic theme). :(
Also doesn't work both methods:
Code: Select all
            if(this.fxVersion < 33 && this.flasher) { // For Firefox 32 and older
               this.flasher.repaintElement(node);
               return;
            }
            // For Firefox 33+
            ...
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

PreviousNext

Return to Buttons made by forum users