That example uses Chrome code (Components.classes,
Components.interfaces, getService()), intended for use by an
Extension.  Greasemonkey does not have access to these objects or
methods.  It is essentially at the same level as whatever javascript
is being run on the page.

Instead, you can just create a div and set its innerHTML to the HTML
in question, but you'll lose the security of UnescapeHTML.  You can
also try the iframe method.

On Mar 25, 5:07 am, Sid <[email protected]> wrote:
> Hi,
>
> Whatever function I put in my GM script, cannot be called.
>
> For example, I'm extracting the html from one of my own site pages
> through an xmlhttprequest.
>
> Then I call HTMLParser() with the retrieved text as argument.
>
> (which can be found 
> herehttps://developer.mozilla.org/en/Code_snippets/HTML_to_DOM#Safely_par...
> )
>
> But it simply fails to return anything.
>
> Any ideas?
>
> Thanks
> Sid

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to