ffos:shell.js ,system app and homescreen

官方文档说shell.js 打开 system app,

shell.js

system app 打开homescreen ?

b2g.js 导入/打开system app?

 system app 再往iframe里加载其他app,如hscr,

 

https://blog.csdn.net/zembers/article/details/48783737

几个问题:

  1. homeURL(b2g.system_startup_url):

     app://system.gaiamobile.org/index.html
    
     "app:// for packaged app resources"
  2. manifestURL:

    app://system.gaiamobile.org/manifest.webapp
    
    "app:// for packaged app resources"
  3. system app实际上是一个iframe
    let systemAppFrame =
      document.createElementNS('http://www.w3.org/1999/xhtml', 'html:iframe');

该iframe是放在shell.html中id为”container”中:

 let container = document.getElementById('container');
 ...
 this.contentBrowser = container.appendChild(systemAppFrame);
 ...

4.systemapp的iframe实际上有一系列属性:

    systemAppFrame.setAttribute('id', 'systemapp');
    systemAppFrame.setAttribute('mozbrowser', 'true');
    systemAppFrame.setAttribute('mozapp', manifestURL);
    systemAppFrame.setAttribute('allowfullscreen', 'true');
    systemAppFrame.setAttribute('src', 'blank.html');

system app的iframe里放的是 ‘blank.html’。其它属性:

    mozbrowser: 
        An "iframe" is turned into a browser frame by setting the mozbrowser attribute

    mozapp:
        see [mozapp](https://wiki.mozilla.org/Security/Reviews/B2G/mozapp)

system app刚开始加载的是

'blank.html',

也就是没有界面的,之后开始加载

homeURL,即"app://system.gaiamobile.org/index.html"

“system.gaiamobile.org”,实际上就是gaia里的system app。该app负责系统ui的显示以及home应用的加载等工作。

问题是:

b2g进程、system进程与Home进程的关系是什么样的? Home进程是如何创建出来的?

system app 是个iframe,

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值