[Project_owners] XPATH: Evaluating the window.content

Renato R. (RRaver) rraver.sp at gmail.com
Sun Apr 9 17:49:33 EDT 2006

Hi Guys,

I need to evaluate a query in the loaded document (window.content?) and 
store it in an array. but I tried a lot of methods and have no success.

I tried to do something like this, replacing the 
"PATH_TO_THE_LOADED_DOCUMENT" by a lot of things...but it always return 
0 in the array, or undefined or does't work in general..

function myFunction() {
        var links = 
PATH_TO_THE_LOADED_DOCUMENT.evaluate("/html/body//a", document, null, 
        for (var i = 0; i < links.snapshotLength; i++) {
window.addEventListener('load', myFunction, true);

If I put this code in a Greasemonkey script it works OK using 
document.evaluate but if I put it in an extension (my intention) it 
doesn't work with document.evaluate

Someone can help?

Many thanks

Renato Rodrigues (RRaver)

More information about the Project_owners mailing list