author Kan-Ru Chen (陳侃如) <>
Wed, 12 Nov 2014 14:20:19 +0800
changeset 215295 920775ddfb85bebc35d2b65f60ad41069516dd0c
parent 215294 a3604ab2b3cae0cb23291de4ed2e2e6876283b66
child 215296 6ccbc46c33db65a03431c720cb1d331fdacace57
permissions -rw-r--r--
Bug 1044736 - Part 6. Widget should only require embed-widgets permission. r=fabrice As discussed on dev-webapi[1] the app that wants to use widgets only need the "embed-widgets" permission to use <iframe mozbrowser mozwidget> If the app also wants to implement a browser, it could request the "browser" separately. A <iframe mozbrowser mozwidget> will have restricted mozbrowser API defined on the prototype if the embedder has the "brower" permission; they will always throw when used. [1]:

  <meta charset="utf-8">
  <title>Test for DataStore - basic operation on a readonly db</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript" src="file_test_widget.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<div id="container"></div>
  <script type="application/javascript;version=1.7">
  gHasBrowserPermission = false;