From b3a9433df3d904e56410ef2878ea7364c6b28a70 Mon Sep 17 00:00:00 2001
From: "kathyw@google.com"
+Unless the doc says otherwise,
+methods in the chrome.* APIs are asynchronous:
+they return immediately,
+without waiting for the operation to finish.
+If you need to know the outcome of an operation,
+then you pass a callback function into the method.
+[PENDING: update/elaborate on that]
+
+In addition to the
+chrome.* APIs,
+extensions can use all the APIs
+that the browser provides
+to web pages and apps.
+If the browser doesn't support an API you want to use,
+you can bundle additional API libraries into your extension.
+ Here's a sampling of the APIs that extensions can use: [PENDING: link to complete list of webkit apis]
A common need for extensions is to have
@@ -16,7 +17,7 @@ The difference is that the background page exists
for the lifetime of your extension,
and only one instance of it at a time is active.
Register your background page in the extension manifest, like this:
@@ -26,10 +27,12 @@ Register your background page in the extension manifest, like this:
"name": "My First Extension",
"version": "1.0",
"description": "The first extension that I made.",
- "background_page": "background.html",
+ "background_page": "background.html",
"toolstrips": ["toolstrip.html"]
}
+
Your toolstrip will likely contain
only the necessary code to display the toolstrip UI,
diff --git a/chrome/common/extensions/docs/static/getstarted.html b/chrome/common/extensions/docs/static/getstarted.html
index fdf05a6..381eacf 100755
--- a/chrome/common/extensions/docs/static/getstarted.html
+++ b/chrome/common/extensions/docs/static/getstarted.html
@@ -1,4 +1,4 @@
-
@@ -70,7 +70,7 @@ at the bottom of the Google Chrome window.
Edit
+
+
diff --git a/chrome/common/extensions/docs/static/background_pages.html b/chrome/common/extensions/docs/static/background_pages.html
index b412635..79ec203 100755
--- a/chrome/common/extensions/docs/static/background_pages.html
+++ b/chrome/common/extensions/docs/static/background_pages.html
@@ -1,4 +1,5 @@
<style>
+ div:hover {
+ -webkit-transform: rotate(360deg);
+ -webkit-transition: all sl ease-out;
+ }
+</style>
+
+ Details
+Manifest
Details
+
--load-extension
flag.
For example, if your extension is at c:\myext
,
your shortcut might look something like this:
-chrome.exe --load-extension="c:\myext"
+chrome.exe --load-extension="c:\myext"
my_toolstrip.html
, so that it has the following code: <div class="toolstrip-button" onclick="window.open('hello_world.html')">
+
<div class="toolstrip-button" onclick="window.open('hello_world.html')">
<span>Hello, World!</span>
</div>
[PENDING: Summarize what we did, what it means, what else we would've done if this were a real extension (e.g. package it), -and where to find more information. -Suggest where to go next.]
+and where to find more information.] + +.crx
file
+ so you can share it with your friends
+ Register your toolstrips in the extension manifest, like this:
+Register your toolstrips in the extension manifest like this:
{ "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", - "toolstrips": [ + "toolstrips": [ "one_toolstrip.html", "two_toolstrip.html" - ] + ] }+
You can create buttons that look like the bookmark bar buttons using this template:
<div class="toolstrip-button"> <!-- Image is optional and should be a 16x16 icon. --> - <img src="path/to/some_icon.png"> + <img src="path/to/some_icon.png"> <span>My Button</span> </div>+
Edit my_toolstrip.html
, so that it has the following code:
<script> +<script> function helloWorld() { var hwFile = 'hello_world.html'; console.log("in helloWorld()"); window.open(hwFile); } -</script>+</script> -<div class="toolstrip-button" onclick="helloWorld();"> +<div class="toolstrip-button" onclick="helloWorld();"> <span>Hello, World!</span> </div>
The relocated code still has the same effect,
@@ -122,9 +122,9 @@ that might be confusing.
that displays the contents of hello_world.html
.
-You now know how to load and debug an extension!
+You now know how to debug an extension! -[PENDING: Summarize what we did, diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html index cc0eee4..18f4ebf 100755 --- a/chrome/common/extensions/docs/template/api_template.html +++ b/chrome/common/extensions/docs/template/api_template.html @@ -60,10 +60,10 @@