Extensions, themes, and applications are simply bundles of resources, wrapped
up with a manifest.json
file that
describes the package's contents. The format of this file is generally stable,
but occasionally breaking changes must be made to address important issues.
Developers should specify which version of the manifest specification their
package targets by setting a manifest_version
key in their
manifests.
Developers should currently specify
'manifest_version': 2
:
{ ..., "manifest_version": 2, ... }
Manifest version 1 was deprecated in Chrome 18, and support will be phased out according to the following schedule.
A content security policy is set to `script-src 'self'
chrome-extension-resource:; object-src 'self'
by default. This has
a variety of impacts on developers, described at length in the
content_security_policy
documentation.
A package's resources are no longer available by default to external
websites (as the src
of an image, or a script
tag). If you want a website to be able to load a resource contained in
your package, you'll need to explicitly whitelist it via the
web_accessible_resources
manifest attribute. This is particularly relevant for extensions that
build up an interface on a website via injected content scripts.
The background_page
property has been replaced with a
background
property that contains either a
scripts
or page
property. Details are available
in the Event Pages documentation.
Browser action changes:
The browser_actions
key in the manifest, and the
chrome.browserActions
API are gone. Use the singular
browser_action
and chrome.browserAction
instead.
The icons
property of browser_action
has
been removed. Use
the default_icon
property
or $ref:browserAction.setIcon instead.
The name
property of browser_action
has been
removed. Use
the default_title
property
or $ref:browserAction.setTitle instead.
The popup
property of browser_action
has
been removed. Use
the default_popup
property
or $ref:browserAction.setPopup instead.
The default_popup
property of browser_action
can no longer be specified as an object. It must be a string.
Page action changes:
The page_actions
key in the manifest, and the
chrome.pageActions
API are gone. Use the singular
page_action
and chrome.pageAction
instead.
The icons
property of page_action
has been
removed. Use
the default_icon
property
or $ref:pageAction.setIcon instead.
The name
property of page_action
has been
removed. Use
the default_title
property
or $ref:pageAction.setTitle instead.
The popup
property of page_action
has been
removed. Use
the default_popup
property
or $ref:pageAction.setPopup instead.
The default_popup
property of page_action
can no longer be specified as an object. It must be a string.
The chrome.self
API has been removed. Use
chrome.extension
instead.
chrome.extension.getTabContentses
(!!!) and
chrome.extension.getExtensionTabs
are gone. Use
$ref:extension.getViews instead.
Port.tab
is gone. Use
$ref:runtime.Port
instead.