• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

st3fan/fxos-repl: Firefox OS REPL

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

st3fan/fxos-repl

开源软件地址:

https://github.com/st3fan/fxos-repl

开源编程语言:

Python 100.0%

开源软件介绍:

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 setup.py 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) $ ./fxos-repl.py list
app://costcontrol.gaiamobile.org/widget.html
app://homescreen.gaiamobile.org/index.html#root
app://gallery.gaiamobile.org/index.html
app://keyboard.gaiamobile.org/index.html

Connect to a specific app and execute commands:

$ source env/bin/activate
(env) $ ./fxos-repl.py connect app://gallery.gaiamobile.org/index.html
Connected to app://gallery.gaiamobile.org/index.html
>>> navigator.userAgent
Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
>>> document.URL
app://gallery.gaiamobile.org/index.html
>>> 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>
      </header>

>>> 



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap