MozRepl

Connect to Firefox and other Mozilla apps, explore and modify them from the inside, while they're running.

Execute Javascript, play with browser GUI, sneak into HTML pages, examine functions and variables, redefine them on the fly, hot-fix bugs, ... MozRepl itself is programmable from within MozRepl.

MozRepl is part of MozLab.

Watch the video: Exploring the browser, online docs, entering web pages, modifying the REPL

Not bad. But still, aside from all the niceties which will surely come, I still still still hope that one day I can use a language such as ruby instead of Javascript to control the aspects ... even if i use it only locally ;)

Well why don't you get on that then.

Dude, that's absolute coolness. Thanks for this great piece of work.

Woah. Thanks! :-)

this rocks, reload current page from inside emacs with one keystroke, you have saved me a million <ctrl> <x> <s> , <alt> <tab>, <ctrl> <r>, <alt> <tab>

Awesome, I love this. I use it all the time! Great work!

I am looking for a MoxRepl - Python module. Does it exist?

I would have loved to have used this, but on XP after I telnet in, it just attempts to process every keystroke I type in the telnet session vs waiting for a cr/lf, is there something I'm doing wrong? Seems like I can't type a single word, as each keystroke gets processed, i.e. if I try to type quit

repl> q @data:application/x-javascript,q:1 !!! ReferenceError: d is not defined

repl> u @data:application/x-javascript,u:1 !!! ReferenceError: d is not defined

repl> i @data:application/x-javascript,i:1 !!! ReferenceError: d is not defined

repl> t @data:application/x-javascript,t:1 !!! ReferenceError: d is not defined

Hi,

check out the first item on the page about troubleshooting.

I am also experiencing the problem described by Steveorevo, every key stroke is getting the Reference error despite entering a ; as the first character or last or anywhere in between, what can solve this?

Quoting from the troubleshooting page:


On Windows, telnet will probably start in character-at-a-time mode. To put it into line-at-a-time mode, press the escape combination (usually Control+]) and enter the command:
set mode console
Windows 2000 telnet has been reported to have no such option. If that is the case, try putty instead.

If I want to get the entire page html dump (including those in IFrame, Frame & those that is generated by the javascript), is it possible with REPL?

You can get a document dump using something like:


var dump = (new XMLSerializer()).serializeToString(document);

For iframes, the containing document only has the tag, so you'd have to get and dump the frame documents separately.

Thks bard, it do provide a good pointer.

however, i am still abit lost, Probably this is due to the dom object modeling inside firefox get me confused.

using javascript, if we wanted to get reference to the frames, we can do it just by typing:
document.FRAME_NAME.etc.etc

I tried to do it using repl, but it can't dump the frame documents. am I doing the right way?

thks in advance.

I found the way to do it, via the frames arrays to access the frames documents.

Here is another question, can we possible to control an event for a particular dom element? e.g. I would like to click on a button, or click on a link etc. etc.

Do we need to write the custom function (I believed jquery is doing it) for repl? or it is supported by itself?

thanks in advance.

I managed to get the click event handler on the dom using custom script (basically the custom script is only used to shorten the typing in repl.

Soon after finishing it, I finally managed to run tru my application entirely via repl. But I encounter issue with page loading.

Currently when there is javascript/links that we click/execute that changes the documents of a certain pages (e.g. from www.google.com going to www.yahoo.com), the call return directly even though the latter pages is not yet displayed.

Not sure this is the right place to ask, it more sounded like the mozilla things, but just to keep everything in one place, how do we listen to the page load? how do repl console get notify when pages are finish loading?

For information, I am scripting using telnet as interface, connected tru repl to control pages in my application.

Yes, it's not MozRepl-specific, but to listen for web page loads when you are in chrome (like you are when you're using MozRepl) one way might be:


getBrowser().addEventListener('load', function(event) {
    myOnLoadHandler(event); 
}, true);

Keep in mind that myOnLoadHandler will be invoked on every page load, not just the next one.

You can probably find useful snippets on http://developer.mozilla.org and perhaps something in the archive of http://groups.google.com/group/mozlab.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
9 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Syndicate content