summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/content_scripts.html
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 19:42:04 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 19:42:04 +0000
commitbb399d97a721cf74316a4af13d704f12a4c45dfd (patch)
tree0c28ad0db3a6d99853ceb9592f443276bc363dbc /chrome/common/extensions/docs/content_scripts.html
parent6939017b8df7e39d829855bda4538fcf75ca3a97 (diff)
downloadchromium_src-bb399d97a721cf74316a4af13d704f12a4c45dfd.zip
chromium_src-bb399d97a721cf74316a4af13d704f12a4c45dfd.tar.gz
chromium_src-bb399d97a721cf74316a4af13d704f12a4c45dfd.tar.bz2
Add support in the extension docs for webRequest event listeners.
These events are special in 2 ways: - Their addListener method can accept extra arguments beyond the callback. - Their callbacks can return a value (in the case of a blocking event), which is sent back to the browser. Review URL: http://codereview.chromium.org/6879027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/content_scripts.html')
-rw-r--r--chrome/common/extensions/docs/content_scripts.html28
1 files changed, 24 insertions, 4 deletions
diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html
index 1097608..7d1bb96 100644
--- a/chrome/common/extensions/docs/content_scripts.html
+++ b/chrome/common/extensions/docs/content_scripts.html
@@ -916,7 +916,7 @@ sending a request to its parent extension.
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);
+ <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span><span>, Type opt_param1, Type opt_param2</span>));
</div>
<div class="description">
@@ -925,9 +925,20 @@ sending a request to its parent extension.
A description from the json schema def of the event goes here.
</p>
- <!-- PARAMETERS -->
+ <!-- LISTENER PARAMETERS -->
+ <div>
+ <h4>Listener parameters</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+
+ <!-- EXTRA PARAMETERS -->
<div>
- <h4>Parameters</h4>
+ <h4>Extra parameters to addListener</h4>
<dl>
<div>
<div>
@@ -935,8 +946,17 @@ sending a request to its parent extension.
</div>
</dl>
</div>
- </div> <!-- /decription -->
+ <!-- LISTENER RETURN VALUE -->
+ <h4>Listener returns</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ </div> <!-- /description -->
</div> <!-- /apiItem -->
</div> <!-- /apiGroup -->