Home | History | Annotate | Download | only in articles
      1 <h1>Manifest Version</h1>
      2 
      3 <style type="text/css">
      4 #schedule h3 {
      5   margin-bottom:0;
      6 }
      7 
      8 #schedule p {
      9   margin-top:0;
     10   margin-bottom:1em;
     11 }
     12 </style>
     13 
     14 <p>
     15   Extensions, themes, and applications are simply bundles of resources, wrapped
     16   up with a <a href="manifest"><code>manifest.json</code></a> file that
     17   describes the package's contents. The format of this file is generally stable,
     18   but occasionally breaking changes must be made to address important issues.
     19   Developers should specify which version of the manifest specification their
     20   package targets by setting a <code>manifest_version</code> key in their
     21   manifests.
     22 </p>
     23 
     24 <h2 id="current-version">Current Version</h2>
     25 
     26 <p>
     27   Developers should currently specify
     28   <strong><code>'manifest_version': 2</code></strong>:
     29 </p>
     30 
     31 <pre>{
     32   ...,
     33   "manifest_version": 2,
     34   ...
     35 }</pre>
     36 
     37 <p>
     38   Manifest version 1 was <em>deprecated</em> in Chrome 18, and support will
     39   be phased out according to the following schedule.
     40 </p>
     41 
     42 <h2 id="manifest-v1-support-schedule">Manifest version 1 support schedule</h2>
     43 
     44 <div id="schedule">
     45 <h3 id="manifest-v1-august2012">August 2012</h3>
     46 <ul>
     47   <li>The Web Store will block creation of new manifest version 1 extensions.
     48   <li>The Web Store will allow updates to existing manifest version 1 extensions.
     49 </ul>
     50 
     51 <h3 id="manifest-v1-march2013">March 2013</h3>
     52 <ul>
     53   <li>The Web Store will block updates to manifest version 1 extensions on March
     54   4th, 2013.
     55 </ul>
     56 
     57 <h3 id="manifest-v1-april2013">April 2013</h3>
     58 <ul>
     59   <li>Chrome 27 Beta will stop packaging manifest version 1 extensions (or loading
     60     them for development).
     61 </ul>
     62 
     63 <h3 id="manifest-v1-june2013">June 2013</h3>
     64 <ul>
     65   <li>The Web Store will remove manifest version 1 extensions from the wall,
     66     search results, and category pages.
     67   <li>Notice emails will be sent to all developers with manifest
     68     version 1 extensions still in the store reminding them that these
     69     extensions will be unpublished and providing update instructions.
     70 </ul>
     71 
     72 <h3 id="manifest-v1-september2013">September 2013</h3>
     73 <ul>
     74   <li>The Web Store will unpublish all manifest version 1 extensions.
     75   <li>Final notice emails will be sent to developers with manifest
     76     version 1 extensions still in the Web Store.
     77   <li>Chrome will continue to load and run installed manifest
     78     version 1 extensions.
     79 </ul>
     80 
     81 <h3 id="manifest-v1-january2014">January 2014</h3>
     82 <ul>
     83   <li>Chrome will stop loading or running manifest
     84     version 1 extensions.
     85 </ul>
     86 </div>
     87 
     88 <h2 id="manifest-v1-changes">Changes between version 1 and 2</h2>
     89 
     90 <ul>
     91   <li>
     92     <p>
     93       A content security policy is set to <code>`script-src 'self'
     94       chrome-extension-resource:; object-src 'self'</code> by default. This has
     95       a variety of impacts on developers, described at length in the
     96       <a href="../extensions/contentSecurityPolicy">
     97       <code>content_security_policy</code></a> documentation.
     98     </p>
     99   </li>
    100   <li>
    101     <p>
    102       A package's resources are no longer available by default to external
    103       websites (as the <code>src</code> of an image, or a <code>script</code>
    104       tag). If you want a website to be able to load a resource contained in
    105       your package, you'll need to explicitly whitelist it via the
    106       <a href="manifest/web_accessible_resources">
    107         <code>web_accessible_resources</code>
    108       </a> manifest attribute. This is particularly relevant for extensions that
    109       build up an interface on a website via injected content scripts.
    110     </p>
    111   </li>
    112   <li>
    113     <p>
    114       The <code>background_page</code> property has been replaced with a
    115       <code>background</code> property that contains <em>either</em> a
    116       <code>scripts</code> or <code>page</code> property. Details are available
    117       in the <a href="event_pages">Event Pages</a> documentation.
    118     </p>
    119   </li>
    120   <li>
    121     <p>Browser action changes:</p>
    122     <ul>
    123       <li>
    124         <p>
    125           The <code>browser_actions</code> key in the manifest, and the
    126           <code>chrome.browserActions</code> API are gone. Use the singular
    127           <a href="browserAction">
    128             <code>browser_action</code> and <code>chrome.browserAction</code>
    129           </a> instead.
    130         </p>
    131       </li>
    132       <li>
    133         <p>
    134           The <code>icons</code> property of <code>browser_action</code> has
    135           been removed. Use <a href="browserAction#manifest">
    136             the <code>default_icon</code> property
    137           </a> or $(ref:browserAction.setIcon) instead.
    138         </p>
    139       </li>
    140       <li>
    141         <p>
    142           The <code>name</code> property of <code>browser_action</code> has been
    143           removed. Use <a href="browserAction#manifest">
    144             the <code>default_title</code> property
    145           </a> or $(ref:browserAction.setTitle) instead.
    146         </p>
    147       </li>
    148       <li>
    149         <p>
    150           The <code>popup</code> property of <code>browser_action</code> has
    151           been removed. Use <a href="browserAction#manifest">
    152             the <code>default_popup</code> property
    153           </a> or $(ref:browserAction.setPopup) instead.
    154         </p>
    155       </li>
    156       <li>
    157         <p>
    158           The <code>default_popup</code> property of <code>browser_action</code>
    159           can no longer be specified as an object. It must be a string.
    160         </p>
    161       </li>
    162     </ul>
    163   </li>
    164   <li>
    165     <p>Page action changes:</p>
    166     <ul>
    167       <li>
    168         <p>
    169           The <code>page_actions</code> key in the manifest, and the
    170           <code>chrome.pageActions</code> API are gone. Use the singular
    171           <a href="pageAction">
    172             <code>page_action</code> and <code>chrome.pageAction</code>
    173           </a> instead.
    174         </p>
    175       </li>
    176       <li>
    177         <p>
    178           The <code>icons</code> property of <code>page_action</code> has been
    179           removed. Use <a href="pageAction#manifest">
    180             the <code>default_icon</code> property
    181           </a> or $(ref:pageAction.setIcon) instead.
    182         </p>
    183       </li>
    184       <li>
    185         <p>
    186           The <code>name</code> property of <code>page_action</code> has been
    187           removed. Use <a href="pageAction#manifest">
    188             the <code>default_title</code> property
    189           </a> or $(ref:pageAction.setTitle) instead.
    190         </p>
    191       </li>
    192       <li>
    193         <p>
    194           The <code>popup</code> property of <code>page_action</code> has been
    195           removed. Use <a href="pageAction#manifest">
    196             the <code>default_popup</code> property
    197           </a> or $(ref:pageAction.setPopup) instead.
    198         </p>
    199       </li>
    200       <li>
    201         <p>
    202           The <code>default_popup</code> property of <code>page_action</code>
    203           can no longer be specified as an object. It must be a string.
    204         </p>
    205       </li>
    206     </ul>
    207   </li>
    208   <li>
    209     <p>
    210       The <code>chrome.self</code> API has been removed. Use
    211       <a href="extension"><code>chrome.extension</code></a> instead.
    212     </p>
    213   </li>
    214   <li>
    215     <p>
    216       <code>chrome.extension.getTabContentses</code> (!!!) and
    217       <code>chrome.extension.getExtensionTabs</code> are gone. Use
    218       $(ref:extension.getViews) instead.
    219     </p>
    220   </li>
    221   <li>
    222     <p>
    223       <code>Port.tab</code> is gone. Use
    224       $(ref:runtime.Port)
    225       instead.
    226     </p>
    227   </li>
    228 </ul>
    229