bard / mozrepl

Remotely control Firefox and other Mozilla apps with JavaScript
https://github.com/bard/mozrepl/wiki/
510 stars 64 forks source link

getElementsByTagName not working #30

Closed pallix closed 12 years ago

pallix commented 12 years ago

Setting

content.location.href = 'http://www.google.com'

and then calling

document.getElementsByTagName("head")

does not work but returns an empty list.

bard commented 12 years ago

Are you in the browser document or in the page document? In the former, it's not supposed to work, as there's no head element. If that is unclear, please see the docs.

pallix commented 12 years ago

Not sure, I'm using the moz.el mode within emacs

rpl commented 12 years ago

You should 'repl.enter' the content, and then 'document' will be the website document you have loaded in the browser context. Il giorno 16/ago/2012 16:40, "Pierre Allix" notifications@github.com ha scritto:

Not sure, I'm using the moz.el mode within emacs

— Reply to this email directly or view it on GitHubhttps://github.com/bard/mozrepl/issues/30#issuecomment-7787342.