Skip to content
Firefox OS REPL
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

What is this?

This is a very simple REPL for Firefox OS. It allows you to list the running applications and then connect a very simple JavaScript console to it. Expressions that you type in the console will be executed in the context of the application that you are connected to. Under the same security permissions.

You will need a device running a debug version of Firefox OS with Marionette support included

I put less than an hour into it so far. Will make much bigger improvements int he coming days.

If you have feature requests then please submit pull requests or file a bug.

How to get it going?

One time setup of a virtualenv that contains the marionette client:

$ virtualenv env
$ source env/bin/activate
$ (cd B2G/gecko/testing/marionette/client && python develop)

Port forward Marionette on your phone to your workstation:

adb forward tcp:2828 tcp:2828

List the available applications (iframes):

$ source env/bin/activate
(env) $ ./ list

Connect to a specific app and execute commands:

$ source env/bin/activate
(env) $ ./ connect app://
Connected to app://
>>> navigator.userAgent
Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
>>> document.URL
>>> document.getElementById('pick-view').innerHTML

      <header id="pick-top">
        <button id="pick-back-button"><span class="icon icon-back"></span></button>
        <h1 id="pick-header" data-l10n-id="pickoneimage2">Select</h1>

Something went wrong with that request. Please try again.