WebAPI/WidgetAPI: Difference between revisions

Line 72: Line 72:
=== Prevent Pages to Be Embedded ===
=== Prevent Pages to Be Embedded ===
==== Packaged App ====
==== Packaged App ====
An app can use "widgetPages" to list the white list of widget pages. All pages in this list can be accessed through widget iframe. Others are shown as blank page.
An app can use "widgetPages" to list the white list of widget pages. All pages in this list can be accessed through widget iframe. Others are shown as error pages. If the widget frame's src points to a page which is NOT listed in widgetPages,
*If a widget navigates to pages which are not listed in widgetPages, the widget iframe shows blank on it.
*for existing app page: show [http://dxr.mozilla.org/mozilla-central/source/xpcom/base/ErrorList.h#474 NS_ERROR_DOM_INVALID_ACCESS_ERR]
*If a widget navigates to another domain, the widget iframe cannot use any APIs which requires permissions.
*for missing app page: show [http://dxr.mozilla.org/mozilla-central/source/xpcom/base/ErrorList.h#443 NS_ERROR_FILE_NOT_FOUND]
*for external web page: show [http://dxr.mozilla.org/mozilla-central/source/xpcom/base/ErrorList.h#474 NS_ERROR_DOM_INVALID_ACCESS_ERR]


==== Web Pages ====
==== Web Pages ====
Confirmed users
209

edits