Release notes for 1.6a9 http://blog.getfirebug.com/2010/04/08/firebug-1-6a9
I have installed Firefox 3.6.3 + Firebug 1.6a9 + Greasemonkey
0.8.20100408.6.
and tried following test case:
http://getfirebug.com/tests/content/console/api/log-xpathresult.html
I see [h2, h2] in the Console panel (after clicking on the Execute
Test button),
which is the expected result. Does this test work for you?
If yes, what should I exactly do to reproduce your case?
Honza
I wanted to try out XPathResult logging so I installed this, but I'm working on a Greasemonkey script, and it appears that console.log(object) doesn't make the [object Object] click able, and console.dir doesn't work at all in Greasemonkey scripts. Is that on purpose? Both worked in 1.5.3 with the same Greasemonkey script (although of course without the enhanced XPathResult display). I'm using Firefox 3.6.3 and Greasemonkey 0.8.20100408.6.I have installed Firefox 3.6.3 + Firebug 1.6a9 + Greasemonkey 0.8.20100408.6. and tried following test case: http://getfirebug.com/tests/content/console/api/log-xpathresult.html
|
|
a
|
23 |
|
|
b
|
42 |
|
|
ANY_TYPE
|
0 |
|
|
ANY_UNORDERED_NODE_TYPE
|
8 |
|
|
BOOLEAN_TYPE
|
3 |
|
|
FIRST_ORDERED_NODE_TYPE
|
9 |
|
|
NUMBER_TYPE
|
1 |
|
|
ORDERED_NODE_ITERATOR_TYPE
|
5 |
|
|
ORDERED_NODE_SNAPSHOT_TYPE
|
7 |
|
|
STRING_TYPE
|
2 |
|
|
UNORDERED_NODE_ITERATOR_TYPE
|
4 |
|
|
UNORDERED_NODE_SNAPSHOT_TYPE
|
6 |
|
|
booleanValue
|
7 |
|
|
get invalidIteratorState
|
false |
|
|
numberValue
|
7 |
|
|
resultType
|
7 |
|
|
singleNodeValue
|
7 |
|
|
snapshotLength
|
8 |
|
|
stringValue
|
7 |
|
|
iterateNext
|
iterateNext() |
|
|
snapshotItem
|
snapshotItem() |
On Apr 9, 11:50 am, "Brian L. Matthews" <blmatth...@gmail.com> wrote:
> On 4/8/10 11:56 PM, Honza (Jan Odvarko) wrote:>> I wanted to try out XPathResult logging so I installed this, but I'm
> >> working on a Greasemonkey script, and it appears that
> >> console.log(object) doesn't make the [object Object] click able, and
> >> console.dir doesn't work at all in Greasemonkey scripts. Is that on
> >> purpose? Both worked in 1.5.3 with the same Greasemonkey script
> >> (although of course without the enhanced XPathResult display). I'm using
> >> Firefox 3.6.3 and Greasemonkey 0.8.20100408.6.
>
> > I have installed Firefox 3.6.3 + Firebug 1.6a9 + Greasemonkey
> > 0.8.20100408.6.
> > and tried following test case:
> >http://getfirebug.com/tests/content/console/api/log-xpathresult.html
>
> Sorry, I wasn't very clear. console.log and console.dir fail only when
> called from a Greasemonkey user script, they work fine (and the
> XPathResult display is nice, thanks!) from regular pages. So the URL
> above works as expected. Here's a test case for the failure in a user
> script:
I guess that you need to contact Greasemonkey. I suppose they are
implementing console.log in the user scripts. We changed the console
implementation in 1.6a9, but not by a lot. There is probably some
small change needed.
Later in 1.6 we should be able to support testing with greasemonkey if
someone from that team or community wants to help with it.
jjb
>
> 1. Copy the text between the dashed lines below and save it in a file
> called test.user.js:
>
> ------------------------------ cut here ------------------------------
> // ==UserScript==
> // @name Testing for Firebug 1.6a9
> // @namespace http://getfirebug.com
> // @description Test console.log and console.dir from a Greasemonkey
> script
> // @include http://getfirebug.com/*
> // ==/UserScript==
>
> var o = {'a': 23, 'b': 42};
>
> console.log('o (via log):', o);
> console.log('o (via dir):');
> console.dir(o);
>
> var r = document.evaluate('//h2', document.body, null,
> XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
>
> console.log('r (via log):', r);
> console.log('r (via dir):');
> console.dir(r);
> ------------------------------ cut here ------------------------------
>
> 2. Open test.user.js in Firefox. Greasemonkey should intercept the open
> and offer to install the user script. After the countdown click Install.
> That installs a user script that's run anytime a URL is visited starting
> withhttp://getfirebug.com/(there's nothing special about that URL, I
> http://getfirebug.com/Testingfor Firebug 1.6a9: o (via log):
> [object Object]http://getfirebug.com/Testingfor Firebug 1.6a9: o (via dir):http://getfirebug.com/Testingfor Firebug 1.6a9: r (via log):
> [object XPCNativeWrapper [object XPathResult]]http://getfirebug.com/Testingfor Firebug 1.6a9: r (via dir):
I'll contact the Greasemonkey people, although an identical version of
Greasemonkey works fine with 1.5.3, so something changed in 1.6a9 (or
maybe earlier, I didn't try any other 1.6's) that broke things. Maybe
it's because Greasemonkey is doing something wrong and 1.5.3 just
happened to work while 1.6a9 has tightened things up, but I'd still
think it important to maintain backward compatibility, particularly with
such a widely used extension as Greasemonkey.
Brian