Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Side by Side Diff: chrome/common/extensions/docs/api_other.html

Issue 179068: Extension Doc Changes (no building or testable changes): minor changes for tab & windows doc (Closed)
Patch Set: touch grd. rendered docs Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mecha nism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is gener eated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTM L is also generated by an offline step so that this page may easily be indexed b y search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes t he single version of page template shell and the "instance" pages (bookmarks.htm l, etc...) can be generated with a build step. --><!-- <html> must retain id="te mplate --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> da ta is significant and loads the needed libraries and styles --><head jstcache="0 "> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache=" 0"> <title jscontent="getPageTitle()" jstcache="1">Other APIs</title> <link href ="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache="0"> <script t ype="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.j s" jstcache="0"> </script> <script type="text/javascript" src="js/api_page_gener ator.js" jstcache="0"></script> <script type="text/javascript" src="js/bootstrap .js" jstcache="0"></script> </head><!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <div id="contai ner" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id= "pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http: //www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcache="0"> <inpu t type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0" > <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" value="Search" j stcache="0"> </div> </form> <script type="text/javascript" src="http://www.googl e.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0"> google.load("elements", "1", {packages: "transliteration"});</script> <script ty pe="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-bo x&amp;t13n_langs=en" jstcache="0"></script> <script type="text/javascript" src=" http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" jstcache=" 0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent="getPageTitl e()" jstcache="1">Other APIs</h1> </div> </div> <!-- /pageHeader --> <div id="pa geContent" jstcache="0"> <!-- SIDENAV --> <div id="leftNav" jstcache="0"> <ul js tcache="0"> <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li> <l i jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></li> <li jst cache="0"> <a href="devguide.html" jstcache="0"><div jstcache="0">Developer's Gu ide</div></a> <ul jstcache="0"> <li jstcache="0"><a href="toolstrip.html" jstcac he="0">Toolstrips</a></li> <li jstcache="0"><a href="pageActions.html" jstcache= "0">Page Actions</a></li> <li jstcache="0"><a href="background_pages.html" jstca che="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html " jstcache="0">Content Scripts</a></li> <li jstcache="0">Events</li> <li jstcach e="0"><a href="tabs.html" jstcache="0">Tabs</a></li> <li jstcache="0"><a href="w indows.html" jstcache="0">Windows</a></li> <li jstcache="0"><a href="bookmarks.h tml" jstcache="0">Bookmarks</a></li> <li jstcache="0">Themes</li> <li jstcache=" 0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a></li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdat e</li> </ul> </li> <li jstcache="0"><a href="tutorials.html" jstcache="0"><div j stcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_ debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Ref erence <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcach e="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li> <li jstcache= "0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </li> <li js tcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </li> <li js tcache="0" class="leftNavSelected">Other APIs </li> </ul> </li> <li jstcache="0" ><a href="http://dev.chromium.org/developers/design-documents/extensions/samples " jstcache="0">Samples</a></li> </ul> </div> <div id="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay="showPageTOC()" jstcache="2" style="display: none; "> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsse lect="getStaticTOC()" jstcache="9"> <a jscontent="name" jsvalues=".href:'#' + hr ef" jstcache="14">h2Name</a> <ol jstcache="0"> <li jsselect="$this.children" jst cache="22"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Name </a> </li> </ol> </li> <div jsselect="apiDefinition" jstcache="3"> <li jstcache= "0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()" jst cache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.properties" j stcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstcache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jscontent="na me" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="41">p ropertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; functions. length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a> <ol jst cache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues= ".href:'#method-' + name" href="#method-anchor" jstcache="42">methodName</a> </l i> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcache=" 7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jsselect="ev ents" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + name" href= "#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdisplay="typ es &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstcache="0">T ypes</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscontent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </o l> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Other APIs</div> <p jstcache="0"> In addition to t he <a href="api_index.html" jstcache="0">chrome.* APIs</a>, extensions can use a ll the APIs that the browser provides to web pages and apps. If the browser does n't support an API you want to use, you can bundle additional API libraries into your extension. </p> <p jstcache="0">Here's a sampling of the APIs that extensi ons can use:</p> <dl jstcache="0"> <dt jstcache="0"><strong jstcache="0"> Standa rd JavaScript APIs </strong></dt> <dd jstcache="0"> <span class="comment" jstcac he="0">[PENDING: define, explain; link to complete list]</span> <!-- Use onclick in your toolbar div to add click behavior. E.g. window.open(someUrl). --></dd> <dt jstcache="0"><strong jstcache="0"> XMLHttpRequest </strong></dt> <dd jstcach e="0"> Lets the extension request data from one or more servers. The manifest sp ecifies which domains the extension can send requests to. <span class="comment" jstcache="0">[PENDING: link to doc]</span></dd> <dt jstcache="0"><strong jstcach e="0"> WebKit APIs </strong></dt> <dd jstcache="0"> Because Google Chrome is bui lt upon WebKit, your extensions can use WebKit APIs. Especially useful are the e xperimental CSS features such as filters, animations, and transformations. Here' s an example of using WebKit styles to make the UI spin: <pre jstcache="0">&lt;s tyle&gt; div:hover { -webkit-transform: rotate(360deg); -webkit-transition: all sl ease-out; } &lt;/style&gt; </pre> <p class="comment" jstcache="0">[PENDING: l ink to complete list of webkit apis]</p> </dd> <dt jstcache="0"><strong jstcache ="0"> V8 APIs</strong>, such as<strong jstcache="0"> JSON </strong></dt> <dd jst cache="0"> JSON is in V8, so you don't need to include a JSON library to use JSO N functions. <span class="comment" jstcache="0">[PENDING: what other APIs are in v8? link to complete list]</span></dd> <dt jstcache="0"> <strong jstcache="0">H TML5</strong> <strong jstcache="0">APIs</strong>, such as <strong jstcache="0">l ocalStorage</strong> and <strong jstcache="0">Web Workers</strong></dt> <dd jstc ache="0"> HTML5 is still being defined and implemented, but one crucial feature it will provide is local storage... <!-- localStorage.setItem(&quot;foo&quot;, & quot;bar&quot;); ... localStorage.getItem(&quot;foo&quot;); --> <span class="com ment" jstcache="0">[PENDING: mention Web Workers, too. Other important API? link to complete list]</span></dd> <dt jstcache="0"><strong jstcache="0">APIs in bun dled libraries</strong></dt> <dd jstcache="0"> If you want to use a library that the browser doesn't provide (for example, jQuery), you can bundle that library' s JavaScript files with your extension. Bundled libraries work in extensions jus t as they would in any other web pages. </dd> </dl> </div> <!-- API PAGE --> <di v class="apiPage" jsselect="apiDefinition" jstcache="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscontent="'API reference: ' + get ModuleName()" jstcache="4">API reference: chrome.apiname </h2> <!-- PROPERTIES - -> <div jsdisplay="$this.properties" class="apiGroup" jstcache="5"> <a name="pro perties" jstcache="0"></a> <h3 id="properties" jstcache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsvalues=".name:' property-' + name" jstcache="15"></a> <h4 jscontent="name" jstcache="16">getLast Error</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" jstcache="23">chrome.extens ion</span><span jscontent="$this.name" jstcache="24">lastError</span> </div> <di v transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a name="methods" jstcache="0"></ a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class ="apiItem" jsselect="functions" jstcache="11"> <a jsvalues=".name:'method-' + na me" jstcache="18"></a> <!-- method-anchor --> <h4 jscontent="name" jstcache="16" >method name</h4> <div class="summary" jstcache="0"><span jsdisplay="returns" js content="getTypeName(returns)" jstcache="25">void</span> <!-- Note: intentionall y longer 80 columns --> <span jscontent="getFullyQualifiedFunctionName($this)" j stcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalue s="class:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstc ache="33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span> <v ar jstcache="0"><span jscontent="name" jstcache="16"></span></var></span>)</div> <div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML :description" jstcache="29"> A description from the json schema def of the funct ion goes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jst cache="0"> <div jsselect="parameters" jstcache="35"> <!-- VALUE: This is a subte mplate that is used elsewhere via jsTemplate *transclude* --> <div id="valueTemp late" jstcache="0"> <dt jstcache="0"> <var jsdisplay="$this.name" jscontent="$th is.name" jstcache="45">paramName</var> <em jstcache="0"> <!-- TYPE --> <div styl e="display:inline" jstcache="0"> ( <span class="optional" jsdisplay="optional" j stcache="46">optional</span> <span id="typeTemplate" jstcache="0"> <span jsdispl ay="getTypeRef($this)" jstcache="47"> <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="49"> Typ e</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdispla y="isArray($this)" jstcache="50"> array of <span jsselect="items" jstcache="52"> <span transclude="typeTemplate" jstcache="53"></span></span> </span> <span jsdis play="!isArray($this)" jscontent="getTypeName($this)" jstcache="51">paramType</s pan> </span> </span> ) </div> </em> </dt> <dd class="todo" jsdisplay="!$this.des cription" jstcache="38"> Undocumented. </dd> <dd jsdisplay="$this.description" j svalues=".innerHTML:$this.description" jstcache="39"> Description of this parame ter from the json schema. </dd> <!-- OBJECT PROPERTIES --> <dd jsdisplay="should ExpandObject($this)" jstcache="40"> <dl jstcache="0"> <div jsselect="getProperty ListFromObject($this)" jstcache="10"> <div transclude="valueTemplate" jstcache=" 17"> </div> </div> </dl> </dd> </div> <!-- /VALUE --> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</h4> <dl jstcache="0"> <div js select="returns" jstcache="36"> <div transclude="valueTemplate" jstcache="17"> < /div> </div> </dl> <!-- CALLBACK --> <div jsdisplay="hasCallback(parameters) " jstcache="31"> <div jsselect="getCallbackParameters(parameters)" jstcache="37" > <h4 jstcache="0">Callback function</h4> <p jstcache="0"> If you specify the <e m jstcache="0">callback</em> parameter, it should specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0" >function(<span jscontent="getSignatureString(parameters)" jstcache="32">Type pa ram1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre > <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="v alueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /desc ription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> < div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGroup" jstcache ="7"> <a name="events" jstcache="0"></a> <h3 id="events" jstcache="0">Events</h3 > <!-- iterates over all events --> <div jsselect="events" class="apiItem" jstca che="12"> <a jsvalues=".name:'event-' + name" jstcache="19"></a> <h4 jscontent=" name" jstcache="16">event name</h4> <div class="summary" jstcache="0"> <!-- Note : intentionally longer 80 columns --> <span jscontent="getModuleName() + '.'" cl ass="subdued" jstcache="23">chrome.bookmarks</span><span jscontent="name" jstcac he="16">onEvent</span><span class="subdued" jstcache="0">.addListener</span>(fun ction(<span jscontent="getSignatureString(parameters)" jstcache="32">Type param1 , Type param2</span>) <span class="subdued" jstcache="0">{...}</span>); </div> < div class="description" jstcache="0"> <p class="todo" jsdisplay="!description" j stcache="28">Undocumented.</p> <p jsdisplay="description" jsvalues=".innerHTML:d escription" jstcache="29"> A description from the json schema def of the event g oes here. </p> <!-- PARAMETERS --> <h4 jstcache="0">Parameters</h4> <dl jstcache ="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- /decription --> </div> <!-- /apiI tem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp ; types.length &gt; 0" class="apiGroup" jstcache="8"> <a name="types" jstcache=" 0"></a> <h3 id="types" jstcache="0">Types</h3> <!-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache="13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstcache="21">type name</h4> <div tr ansclude="valueTemplate" jstcache="17"> </div> </div> <!-- /apiItem --> </div> < !-- /apiGroup --> </div> <!-- /apiPage --> </div> <!-- /mainColumn --> </div> <! -- /pageContent --> <div id="pageFooter" --="" jstcache="0"> <p jstcache="0"> Ex cept as otherwise <a href="http://code.google.com/policies.html#restrictions" js tcache="0">noted</a>, the content of this page is licensed under the <a rel="lic ense" href="http://creativecommons.org/licenses/by/3.0/" jstcache="0">Creative C ommons Attribution 3.0 License</a>, and code samples are licensed under the <a r el="license" href="http://code.google.com/google_bsd_license.html" jstcache="0"> BSD License</a>. </p> <p jstcache="0"> ©2009 Google </p> </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html> 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the
4 templating mechanism.
5 2) The <body> tag *must* retain id="body"
6 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
7 browser, it will be re-generated from the template, json schema and
8 authored overview content.
9 4) The <body>.innerHTML is also generated by an offline step so that this
10 page may easily be indexed by search engines.
11
12 TODO(rafaelw): Abstract this into a "pageshell" that becomes the single
13 version of page template shell and the "instance" pages (bookmarks.html,
14 etc...) can be generated with a build step.
15 --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/x html" jstcache="0"><!-- <head> data is significant and loads the needed librarie s and styles --><head jstcache="0">
16 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache= "0">
17 <title jscontent="getPageTitle()" jstcache="1">Other APIs</title>
18 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache= "0">
19 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js" jstcache="0">
20 </script>
21 <script type="text/javascript" src="js/api_page_generator.js" jstcache="0">< /script>
22 <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script>
23 </head><!-- <body> content is completely generated. Do not edit, as it will be
24 and rewritten. --><body jstcache="0"> <div id="container" jstcache="0">
25 <a name="top" jstcache="0"> </a>
26 <!-- API HEADER -->
27 <div id="pageHeader" jstcache="0">
28 <div id="searchbox" jstcache="0">
29 <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0 ">
30 <div jstcache="0">
31 <input type="hidden" name="cx" value="002967670403910741006:61_cvzfq tno" jstcache="0">
32 <input type="hidden" name="ie" value="UTF-8" jstcache="0">
33 <input type="text" name="q" size="31" jstcache="0">
34 <input type="submit" name="sa" value="Search" jstcache="0">
35 </div>
36 </form>
37
38 <script type="text/javascript" src="http://www.google.com/jsapi" jstcach e="0"></script>
39 <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script>
40 <script type="text/javascript" src="http://www.google.com/coop/cse/t13n? form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script>
41 <script type="text/javascript" src="http://www.google.com/coop/cse/brand ?form=cse-search-box&amp;lang=en" jstcache="0"></script>
42 </div>
43 <div id="pageTitle" jstcache="0">
44 <h1 jscontent="getPageTitle()" jstcache="1">Other APIs</h1>
45 </div>
46 </div> <!-- /pageHeader -->
47
48 <div id="pageContent" jstcache="0">
49 <!-- SIDENAV -->
50 <div id="leftNav" jstcache="0">
51 <ul jstcache="0">
52 <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li>
53 <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Start ed</a></li>
54 <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></l i>
55 <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache=" 0">Developer's Guide</div></a>
56 <ul jstcache="0">
57 <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips< /a></li>
58 <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Acti ons</a></li>
59 <li jstcache="0"><a href="background_pages.html" jstcache="0">Back ground Pages</a></li>
60 <li jstcache="0"><a href="content_scripts.html" jstcache="0">Conte nt Scripts</a></li>
61 <li jstcache="0"><a href="events.html" jstcache="0">Events</a></li >
62 <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li>
63 <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></ li>
64 <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</ a></li>
65 <li jstcache="0"><a href="themes.html" jstcache="0">Themes</a></li >
66 <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</ a></li>
67 <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</ a></li>
68 <li jstcache="0">Autoupdate</li>
69 </ul>
70 </li>
71 <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache=" 0">Tutorials</div></a>
72 <ul jstcache="0">
73 <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debuggi ng</a></li>
74 </ul>
75 </li>
76 <li jstcache="0">Reference
77 <ul jstcache="0">
78 <li jstcache="0"> Formats
79 <ul jstcache="0">
80 <li jstcache="0"><a href="manifest.html" jstcache="0">Manifest Files</a></li>
81 <li jstcache="0"><a href="match_patterns.html" jstcache="0">Ma tch Patterns</a></li>
82 <li jstcache="0">Packages (.crx)</li>
83 </ul>
84 </li>
85 <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* A PIs</a> </li>
86 <li jstcache="0" class="leftNavSelected">Other APIs </li>
87 </ul>
88 </li>
89 <li jstcache="0"><a href="http://dev.chromium.org/developers/design-doc uments/extensions/samples" jstcache="0">Samples</a></li>
90 </ul>
91 </div>
92
93 <div id="mainColumn" jstcache="0">
94 <!-- TABLE OF CONTENTS -->
95 <div id="toc" jsdisplay="showPageTOC()" jstcache="2" style="display: non e; ">
96 <p jstcache="0">Contents</p>
97 <ol jstcache="0">
98 <li jsselect="getStaticTOC()" jstcache="9">
99 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h2Na me</a>
100 <ol jstcache="0">
101 <li jsselect="$this.children" jstcache="22">
102 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14"> h3Name</a>
103 </li>
104 </ol>
105 </li>
106 <div jsselect="apiDefinition" jstcache="3">
107 <li jstcache="0">
108 <a href="#apiReference" jscontent="'API reference: ' + getModule Name()" jstcache="4">API reference</a>
109 <ol jstcache="0">
110 <li jsdisplay="$this.properties" jstcache="5">
111 <a href="#properties" jstcache="0">Properties</a>
112 <ol jstcache="0">
113 <li jsselect="getPropertyListFromObject($this)" jstcache=" 10">
114 <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a>
115 </li>
116 </ol>
117 </li>
118 <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" j stcache="6">
119 <a href="#methods" jstcache="0">Methods</a>
120 <ol jstcache="0">
121 <li jsselect="functions.sort(sortByName)" jstcache="11">
122 <a jscontent="name" jsvalues=".href:'#method-' + name" h ref="#method-anchor" jstcache="43">methodName</a>
123 </li>
124 </ol>
125 </li>
126 <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcach e="7">
127 <a href="#events" jstcache="0">Events</a>
128 <ol jstcache="0">
129 <li jsselect="events.sort(sortByName)" jstcache="12">
130 <a jscontent="name" jsvalues=".href:'#event-' + name" hr ef="#event-anchor" jstcache="44">eventName</a>
131 </li>
132 </ol>
133 </li>
134 <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache= "8">
135 <a href="#types" jstcache="0">Types</a>
136 <ol jstcache="0">
137 <li jsselect="types.sort(sortByName)" jstcache="38">
138 <a jscontent="id" jsvalues=".href:'#type-' + id" href="# id-anchor" jstcache="45">id</a>
139 </li>
140 </ol>
141 </li>
142 </ol>
143 </li>
144 </div>
145 </ol>
146 </div>
147 <!-- /TABLE OF CONTENTS -->
148
149 <!-- STATIC CONTENT PLACEHOLDER -->
150 <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Other APIs</div>
151
152 <p jstcache="0">
153 In addition to the
154 <a href="api_index.html" jstcache="0">chrome.* APIs</a>,
155 extensions can use all the APIs
156 that the browser provides
157 to web pages and apps.
158 If the browser doesn't support an API you want to use,
159 you can bundle additional API libraries into your extension.
160 </p>
161
162 <p jstcache="0">Here's a sampling of the APIs that extensions can use:</p>
163
164 <dl jstcache="0">
165 <dt jstcache="0"><strong jstcache="0"> Standard JavaScript APIs </strong></dt>
166 <dd jstcache="0"> <span class="comment" jstcache="0">[PENDING: define, explain; link to complete list]</span>
167 <!-- Use onclick in your toolbar div to add click behavior.
168 E.g. window.open(someUrl). --></dd>
169 <dt jstcache="0"><strong jstcache="0"> XMLHttpRequest </strong></dt>
170 <dd jstcache="0">
171 Lets the extension request data from one or more servers.
172 The manifest specifies
173 which domains the extension can send requests to.
174 <span class="comment" jstcache="0">[PENDING: link to doc]</span></dd>
175 <dt jstcache="0"><strong jstcache="0"> WebKit APIs </strong></dt>
176 <dd jstcache="0">
177 Because Google Chrome is built upon WebKit,
178 your extensions can use WebKit APIs.
179 Especially useful are the experimental CSS features
180 such as filters, animations, and transformations.
181 Here's an example of using WebKit styles
182 to make the UI spin:
183 <pre jstcache="0">&lt;style&gt;
184 div:hover {
185 -webkit-transform: rotate(360deg);
186 -webkit-transition: all sl ease-out;
187 }
188 &lt;/style&gt;
189 </pre>
190 <p class="comment" jstcache="0">[PENDING: link to complete list of webkit apis ]</p>
191 </dd>
192 <dt jstcache="0"><strong jstcache="0"> V8 APIs</strong>, such as<strong jstcache ="0"> JSON </strong></dt>
193 <dd jstcache="0"> JSON is in V8, so you don't need to include a JSON library to use JSON functions. <span class="comment" jstcache="0">[PENDING: what other APIs are in v8? link to complete list]</span></dd>
194 <dt jstcache="0"> <strong jstcache="0">HTML5</strong> <strong jstcache="0">APIs< /strong>, such as <strong jstcache="0">localStorage</strong> and <strong jstcach e="0">Web Workers</strong></dt>
195 <dd jstcache="0"> HTML5 is still being defined and implemented, but one crucial feature it will provide is local storage... <!--
196 localStorage.setItem(&quot;foo&quot;, &quot;bar&quot;); ... localStorage.getItem (&quot;foo&quot;); --> <span class="comment" jstcache="0">[PENDING: mention Web Workers, too. Other important API? link to complete list]</span></dd>
197 <dt jstcache="0"><strong jstcache="0">APIs in bundled libraries</strong></dt>
198 <dd jstcache="0"> If you want to use a library that the browser doesn't provide
199 (for example, jQuery),
200 you can bundle that library's JavaScript files with your extension.
201 Bundled libraries work in extensions
202 just as they would in any other web pages.
203 </dd>
204 </dl>
205
206 </div>
207
208 <!-- API PAGE -->
209 <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="displa y: none; ">
210 <a name="apiReference" jstcache="0"></a>
211 <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API ref erence: chrome.apiname </h2>
212
213 <!-- PROPERTIES -->
214 <div jsdisplay="$this.properties" class="apiGroup" jstcache="5">
215 <a name="properties" jstcache="0"></a>
216 <h3 id="properties" jstcache="0">Properties</h3>
217
218 <div jsselect="getPropertyListFromObject($this)" jstcache="10">
219 <a jsvalues=".name:'property-' + name" jstcache="15"></a>
220 <h4 jscontent="name" jstcache="16">getLastError</h4>
221 <div class="summary" jstcache="0">
222 <!-- Note: intentionally longer 80 columns -->
223 <span jscontent="getModuleName() + '.'" jstcache="23">chrome.ext ension</span><span jscontent="$this.name" jstcache="24">lastError</span>
224 </div>
225 <div transclude="valueTemplate" jstcache="17">
226 </div>
227 </div>
228
229 </div> <!-- /apiGroup -->
230
231 <!-- METHODS -->
232 <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="a piGroup" id="methods" jstcache="6">
233 <a name="methods" jstcache="0"></a>
234 <h3 jstcache="0">Methods</h3>
235
236 <!-- iterates over all functions -->
237 <div class="apiItem" jsselect="functions.sort(sortByName)" jstcache= "11">
238 <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- metho d-anchor -->
239 <h4 jscontent="name" jstcache="16">method name</h4>
240
241 <div class="summary" jstcache="0"><span jsdisplay="returns" jscont ent="getTypeName(returns)" jstcache="25">void</span>
242 <!-- Note: intentionally longer 80 columns -->
243 <span jscontent="getFullyQualifiedFunctionName($this)" jstcach e="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="cla ss:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache=" 33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span>
244 <var jstcache="0"><span jscontent="name" jstcache="16"></s pan></var></span>)</div>
245
246 <div class="description" jstcache="0">
247 <p class="todo" jsdisplay="!description" jstcache="28">Undocumen ted.</p>
248 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="29">
249 A description from the json schema def of the function goes he re.
250 </p>
251
252 <!-- PARAMETERS -->
253 <h4 jstcache="0">Parameters</h4>
254 <dl jstcache="0">
255 <div jsselect="parameters" jstcache="35">
256
257 <!-- VALUE: This is a subtemplate that is used elsewhere
258 via jsTemplate *transclude* -->
259 <div id="valueTemplate" jstcache="0">
260 <dt jstcache="0">
261 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">paramName</var>
262 <em jstcache="0">
263
264 <!-- TYPE -->
265 <div style="display:inline" jstcache="0">
266 (
267 <span class="optional" jsdisplay="optional" jstc ache="47">optional</span>
268 <span id="typeTemplate" jstcache="0">
269 <span jsdisplay="getTypeRef($this)" jstcache=" 48">
270 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
271 </span>
272 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
273 <span jsdisplay="isArray($this)" jstcache="5 1">
274 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
275 </span>
276 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">paramType</span>
277 </span>
278 </span>
279 )
280 </div>
281
282 </em>
283 </dt>
284 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39">
285 Undocumented.
286 </dd>
287 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">
288 Description of this parameter from the json schema.
289 </dd>
290
291 <!-- OBJECT PROPERTIES -->
292 <dd jsdisplay="shouldExpandObject($this)" jstcache="41">
293 <dl jstcache="0">
294 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
295 <div transclude="valueTemplate" jstcache="17">
296 </div>
297 </div>
298 </dl>
299 </dd>
300 </div> <!-- /VALUE -->
301
302 </div>
303 </dl>
304
305 <!-- RETURNS -->
306 <h4 jsdisplay="returns" jstcache="30">Returns</h4>
307 <dl jstcache="0">
308 <div jsselect="returns" jstcache="36">
309 <div transclude="valueTemplate" jstcache="17">
310 </div>
311 </div>
312 </dl>
313
314 <!-- CALLBACK -->
315 <div jsdisplay="hasCallback(parameters)" jstcache="31">
316 <div jsselect="getCallbackParameters(parameters)" jstcache="37 ">
317 <h4 jstcache="0">Callback function</h4>
318 <p jstcache="0">
319 If you specify the <em jstcache="0">callback</em> parameter,
320 it should specify a function that looks like this:
321 </p>
322
323 <!-- Note: intentionally longer 80 columns -->
324 <pre jstcache="0">function(<span jscontent="getSignatureString (parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdue d" jstcache="0">{...}</span>);</pre>
325 <dl jstcache="0">
326 <div jsselect="parameters" jstcache="35">
327 <div transclude="valueTemplate" jstcache="17">
328 </div>
329 </div>
330 </dl>
331 </div>
332 </div>
333
334 </div> <!-- /description -->
335
336 </div> <!-- /apiItem -->
337
338 </div> <!-- /apiGroup -->
339
340 <!-- EVENTS -->
341 <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGrou p" jstcache="7">
342 <a name="events" jstcache="0"></a>
343 <h3 id="events" jstcache="0">Events</h3>
344
345 <!-- iterates over all events -->
346 <div jsselect="events.sort(sortByName)" class="apiItem" jstcache="12 ">
347 <a jsvalues=".name:'event-' + name" jstcache="19"></a>
348 <h4 jscontent="name" jstcache="16">event name</h4>
349
350 <div class="summary" jstcache="0">
351 <!-- Note: intentionally longer 80 columns -->
352 <span jscontent="getModuleName() + '.'" class="subdued" jstcache ="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span> <span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent= "getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);
353 </div>
354
355 <div class="description" jstcache="0">
356 <p class="todo" jsdisplay="!description" jstcache="28">Undocumen ted.</p>
357 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="29">
358 A description from the json schema def of the event goes here.
359 </p>
360
361 <!-- PARAMETERS -->
362 <h4 jstcache="0">Parameters</h4>
363 <dl jstcache="0">
364 <div jsselect="parameters" jstcache="35">
365 <div transclude="valueTemplate" jstcache="17">
366 </div>
367 </div>
368 </dl>
369
370 </div> <!-- /decription -->
371
372 </div> <!-- /apiItem -->
373
374 </div> <!-- /apiGroup -->
375
376 <!-- TYPES -->
377 <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8">
378 <a name="types.sort(sortByName)" jstcache="0"></a>
379 <h3 id="types" jstcache="0">Types</h3>
380
381 <!-- iterates over all types -->
382 <div jsselect="types" class="apiItem" jstcache="13">
383 <a jsvalues=".name:'type-' + id" jstcache="20"></a>
384 <h4 jscontent="id" jstcache="21">type name</h4>
385
386 <div transclude="valueTemplate" jstcache="17">
387 </div>
388
389 </div> <!-- /apiItem -->
390
391 </div> <!-- /apiGroup -->
392
393 </div> <!-- /apiPage -->
394 </div> <!-- /mainColumn -->
395 </div> <!-- /pageContent -->
396 <div id="pageFooter" --="" jstcache="0">
397 <p jstcache="0">
398 Except as otherwise <a href="http://code.google.com/policies.html#restrictions " jstcache="0">noted</a>,
399 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/" jstcache="0">Creative Commons
400 Attribution 3.0 License</a>, and code samples are licensed under the
401 <a rel="license" href="http://code.google.com/google_bsd_license.html" jstcach e="0">BSD License</a>.
402 </p>
403 <p jstcache="0">
404 ©2009 Google
405 </p>
406 </div> <!-- /pageFooter -->
407 </div> <!-- /container -->
408 </body></html>
409 #EOF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698