Closed nkkarthik closed 11 years ago
I tested it again. It doesn't work with FF 17 or 18. I went back to 16.0.2 and it seems to work now.
Got the same exact issue.
repl> repl.enter(content); repl> repl.back(); !!! TypeError: repl.back is not a function
This is a pity because it makes moz.el unusable from Emacs if you want to load your JS buffer to the current HTML page via C-c C-l
Any idea about how to fix this?
If this can help it only happens when you do a repl.enter(content) when a HTML page is loaded in a tab. For example, if you do it when the add-ons tab is focused, everything works as expected.
This on Firefox 20.0.1
Yeah, I too noticed that it works with add-ons tab. I am not sure why this happens and, sadly, don't have time to debug the issue (keeping aside whether I can debug it in the first place :) ). For now just sticking with Firefox v16.
Yes, I can reproduce this bug as well for any FF v17+. A big show-stopper for my use cases.
While I am having the same issue, there's a simple workaround since you don't need to enter
the content object in order use its methods:
content.document.location.href = "http://maps.google.com";
// get the context of the visible tab and save it
var maps = content.document;
var searchInput = maps.getElementById("gbqfq");
content.alert(searchInput.value);
searchInput.value = "from: new york city, ny to: chicago, il";
maps.getElementById("gbqfb").click();
I apologize for the sloppy code.
I'm seeing this issue again in FF 25 with this patched version.
repl> repl.enter(content.document); [object HTMLDocument] - {location: {...}, global-zeroclipboard-flash-bridge: function() {...}, jQuery203084890703625190040.053885937142066576: 2, jQuery203084890703625190040.3173927485539211: 55, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, ...} repl> repl.home(); !!! TypeError: repl is undefined
However, repl.enter(content); repl.enter(document);
works as intended to enter content.document
I get the same problem with firefox 40.0
repl> repl.enter(content.document)
repl> repl.look()
!!! ReferenceError: repl is not defined
Details:
Even if I enter one at a time:
repl> repl.enter(content)
repl> repl.enter(document)
repl> repl.look()
!!! ReferenceError: repl is not defined
Details:
Please look at the below interaction.
What could I be doing wrong here, let me know, please.
This happens only with some pages... but it consistently happens with those pages.