WebAPI/WidgetAPI: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 4: Line 4:
==Use case==
==Use case==
==Proposal==
==Proposal==
===embed-widgets ===
=== embed-widgets {{bug|1005818}} ===
In order to expose to privileged APPs and consider security issue.<br />
In order to expose to privileged APPs and consider security issue.<br />
"embed-widgets" is a new permission for "mozapp" attribute, it comes from 'embed-apps' but is more restricted. {{bug|1005818}}
* "embed-widgets" is a new permission for "mozapp" attribute, it comes from [https://developer.mozilla.org/en-US/Apps/Build/App_permissions#embed-apps 'embed-apps'] but is more restricted.Disallow some of Browser API that embedder can not receive events and use those.
   <iframe mozapp="manifesturl" mozwidget="mywidget1">
* Set manifest entry in "widget" attribute. 
   <iframe mozapp="manifesturl" widget="mywidget1">


===extend manifest.webapp===
===extend manifest.webapp===

Revision as of 08:22, 21 May 2014

Widget API

The widget API allows privileged APPs have ability to embed APPs in their own iframe.

Use case

Proposal

embed-widgets bug 1005818

In order to expose to privileged APPs and consider security issue.

  • "embed-widgets" is a new permission for "mozapp" attribute, it comes from 'embed-apps' but is more restricted.Disallow some of Browser API that embedder can not receive events and use those.
  • Set manifest entry in "widget" attribute.
 <iframe mozapp="manifesturl" widget="mywidget1">

extend manifest.webapp

Declare details of widget in mainfest.

 {
   name: "MyApp2000",
   ...
   widgets: {
     "mywidget1": {
       href: "widget.html"
       positions: ["homescreen", "lockscreen"]
       description: "This is my cool widget"
      },
      "myotherwidget": { ... }
   }
 }

Restriction

Issues under discussion

Bugs