Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added 1.1 docset from release candidate 1

  • Loading branch information...
commit 595a8b945b2182036f8305d7d5a080934c8fb11b 1 parent ad7d8a3
@wbamberg wbamberg authored
Showing with 2,605 additions and 531 deletions.
  1. 0  base.html
  2. 0  css/api-reference.css
  3. 0  css/base.css
  4. 0  css/footer.css
  5. 0  css/header.css
  6. 0  css/sdk-docs.css
  7. +1 −1  dev-guide/addon-development/about.html
  8. +1 −1  dev-guide/addon-development/annotator/annotator.html
  9. +1 −1  dev-guide/addon-development/annotator/creating.html
  10. +1 −1  dev-guide/addon-development/annotator/displaying.html
  11. +1 −1  dev-guide/addon-development/annotator/overview.html
  12. +1 −1  dev-guide/addon-development/annotator/storing.html
  13. +1 −1  dev-guide/addon-development/annotator/widget.html
  14. +1 −1  dev-guide/addon-development/api-idioms.html
  15. +1 −1  dev-guide/addon-development/api-intro.html
  16. +5 −2 dev-guide/addon-development/api-modules.html
  17. +1 −1  dev-guide/addon-development/cfx-tool.html
  18. +14 −3 dev-guide/addon-development/commonjs.html
  19. +1 −1  dev-guide/addon-development/console.html
  20. +1 −1  dev-guide/addon-development/events.html
  21. +1 −1  dev-guide/addon-development/getting-started.html
  22. +1 −1  dev-guide/addon-development/guides.html
  23. +1 −1  dev-guide/addon-development/implementing-reusable-module.html
  24. +2 −2 dev-guide/addon-development/implementing-simple-addon.html
  25. +50 −20 dev-guide/addon-development/installation.html
  26. +1 −1  dev-guide/addon-development/module-search.html
  27. +9 −9 dev-guide/addon-development/package-spec.html
  28. +1 −1  dev-guide/addon-development/program-id.html
  29. +1 −1  dev-guide/addon-development/reference.html
  30. +1 −1  dev-guide/addon-development/troubleshooting.html
  31. +1 −1  dev-guide/addon-development/tutorials.html
  32. +1 −1  dev-guide/addon-development/two-types-of-scripts.html
  33. +4 −1 dev-guide/addon-development/web-content.html
  34. +4 −2 dev-guide/appendices/credits.html
  35. +4 −5 dev-guide/appendices/glossary.html
  36. +1 −1  dev-guide/module-development/about.html
  37. +9 −9 dev-guide/module-development/best-practices.html
  38. +1 −1  dev-guide/module-development/chrome.html
  39. +1 −1  dev-guide/module-development/e10s.html
  40. +1 −1  dev-guide/module-development/globals.html
  41. +1 −1  dev-guide/module-development/guides.html
  42. +1 −1  dev-guide/module-development/reference.html
  43. +1 −1  dev-guide/module-development/tutorials.html
  44. +3 −3 dev-guide/module-development/xpi.html
  45. +1 −1  dev-guide/welcome.html
  46. +1 −1  index.html
  47. 0  js/jquery.js
  48. 0  js/main.js
  49. 0  md/dev-guide/addon-development/about.md
  50. 0  md/dev-guide/addon-development/annotator/annotator.md
  51. 0  md/dev-guide/addon-development/annotator/creating.md
  52. 0  md/dev-guide/addon-development/annotator/displaying.md
  53. 0  md/dev-guide/addon-development/annotator/overview.md
  54. 0  md/dev-guide/addon-development/annotator/storing.md
  55. 0  md/dev-guide/addon-development/annotator/widget.md
  56. 0  md/dev-guide/addon-development/api-idioms.md
  57. 0  md/dev-guide/addon-development/api-intro.md
  58. +4 −0 md/dev-guide/addon-development/api-modules.md
  59. 0  md/dev-guide/addon-development/cfx-tool.md
  60. +14 −2 md/dev-guide/addon-development/commonjs.md
  61. 0  md/dev-guide/addon-development/console.md
  62. 0  md/dev-guide/addon-development/events.md
  63. 0  md/dev-guide/addon-development/getting-started.md
  64. 0  md/dev-guide/addon-development/guides.md
  65. 0  md/dev-guide/addon-development/implementing-reusable-module.md
  66. +1 −1  md/dev-guide/addon-development/implementing-simple-addon.md
  67. +58 −19 md/dev-guide/addon-development/installation.md
  68. 0  md/dev-guide/addon-development/module-search.md
  69. +8 −8 md/dev-guide/addon-development/package-spec.md
  70. 0  md/dev-guide/addon-development/program-id.md
  71. 0  md/dev-guide/addon-development/reference.md
  72. 0  md/dev-guide/addon-development/troubleshooting.md
  73. 0  md/dev-guide/addon-development/tutorials.md
  74. 0  md/dev-guide/addon-development/two-types-of-scripts.md
  75. +3 −0  md/dev-guide/addon-development/web-content.md
  76. +3 −1 md/dev-guide/appendices/credits.md
  77. +3 −4 md/dev-guide/appendices/glossary.md
  78. 0  md/dev-guide/module-development/about.md
  79. +8 −8 md/dev-guide/module-development/best-practices.md
  80. 0  md/dev-guide/module-development/chrome.md
  81. 0  md/dev-guide/module-development/e10s.md
  82. 0  md/dev-guide/module-development/globals.md
  83. 0  md/dev-guide/module-development/guides.md
  84. 0  md/dev-guide/module-development/reference.md
  85. 0  md/dev-guide/module-development/tutorials.md
  86. +2 −2 md/dev-guide/module-development/xpi.md
  87. 0  md/dev-guide/welcome.md
  88. 0  media/annotator/annotation-list.png
  89. 0  media/annotator/annotation-panel.png
  90. 0  media/annotator/annotator-design.png
  91. 0  media/annotator/editor-panel.png
  92. 0  media/annotator/highlight.png
  93. 0  media/annotator/matcher.png
  94. 0  media/annotator/pencil-off.png
  95. 0  media/annotator/pencil-on.png
  96. 0  media/annotator/widget-icon.png
  97. 0  media/bg-footer.png
  98. 0  media/bg-header.png
  99. 0  media/commonjs-modules.jpg
  100. 0  media/commonjs-translator.jpg
  101. 0  media/content-scripting-events.png
  102. 0  media/content-scripting-overview.png
  103. 0  media/favicon.png
  104. 0  media/firefox-32.png
  105. 0  media/firefox-logo.png
  106. 0  media/footer-logo-med.png
  107. 0  media/mozilla-tab.png
  108. 0  media/multiple-workers.jpg
  109. 0  media/screenshots/default-panel-osx.png
  110. 0  media/screenshots/default-panel-ubuntu.png
  111. 0  media/screenshots/default-panel-windows.png
  112. 0  media/screenshots/modules/context-menu-image-osx.png
  113. 0  media/screenshots/modules/notification-growl-osx.png
  114. 0  media/screenshots/modules/panel-tabs-osx.png
  115. 0  media/screenshots/modules/widget-content-osx.png
  116. 0  media/screenshots/modules/widget-icon-osx.png
  117. 0  media/screenshots/modules/widget-panel-osx.png
  118. 0  media/screenshots/translator/context-menu-osx.png
  119. 0  media/screenshots/translator/translated-osx.png
  120. BIN  media/screenshots/widget-panel-clock.png
  121. 0  media/twitter-widget.png
  122. +2 −2 packages/addon-kit/addon-kit.html
  123. +1 −1  packages/addon-kit/docs/clipboard.html
  124. +233 −84 packages/addon-kit/docs/context-menu.html
  125. +216 −88 packages/addon-kit/docs/context-menu.md
  126. +232 −83 packages/addon-kit/docs/context-menu.md.div
  127. +1 −1  packages/addon-kit/docs/context-menu.md.json
  128. +1 −1  packages/addon-kit/docs/hotkeys.html
  129. +1 −1  packages/addon-kit/docs/notifications.html
  130. +24 −4 packages/addon-kit/docs/page-mod.html
  131. +27 −3 packages/addon-kit/docs/page-mod.md
  132. +23 −3 packages/addon-kit/docs/page-mod.md.div
  133. +1 −1  packages/addon-kit/docs/page-mod.md.json
  134. +1 −1  packages/addon-kit/docs/page-worker.html
  135. +1 −1  packages/addon-kit/docs/panel.html
  136. +1 −1  packages/addon-kit/docs/passwords.html
  137. +1 −1  packages/addon-kit/docs/private-browsing.html
  138. +1 −1  packages/addon-kit/docs/request.html
  139. +1 −1  packages/addon-kit/docs/selection.html
  140. +6 −5 packages/addon-kit/docs/self.html
  141. +7 −5 packages/addon-kit/docs/self.md
  142. +5 −4 packages/addon-kit/docs/self.md.div
  143. +1 −1  packages/addon-kit/docs/self.md.json
  144. +1 −1  packages/addon-kit/docs/simple-storage.html
  145. +19 −14 packages/addon-kit/docs/tabs.html
  146. +21 −15 packages/addon-kit/docs/tabs.md
  147. +18 −13 packages/addon-kit/docs/tabs.md.div
  148. +1 −1  packages/addon-kit/docs/tabs.md.json
  149. +1 −1  packages/addon-kit/docs/timers.html
  150. +73 −1 packages/addon-kit/docs/widget.html
  151. +79 −0 packages/addon-kit/docs/widget.md
  152. +72 −0 packages/addon-kit/docs/widget.md.div
  153. +1 −1  packages/addon-kit/docs/widget.md.json
  154. +1 −1  packages/addon-kit/docs/windows.html
  155. +3 −3 packages/api-utils/README.md
  156. +5 −5 packages/api-utils/api-utils.html
  157. +1 −1  packages/api-utils/docs/api-utils.html
  158. +1 −1  packages/api-utils/docs/app-strings.html
  159. +1 −1  packages/api-utils/docs/byte-streams.html
  160. +1 −1  packages/api-utils/docs/collection.html
  161. +1 −1  packages/api-utils/docs/content.html
  162. +1 −1  packages/api-utils/docs/content/loader.html
  163. +710 −0 packages/api-utils/docs/content/proxy.html
  164. +237 −0 packages/api-utils/docs/content/proxy.md
  165. +253 −0 packages/api-utils/docs/content/proxy.md.div
  166. +1 −0  packages/api-utils/docs/content/proxy.md.json
  167. +1 −1  packages/api-utils/docs/content/symbiont.html
  168. +1 −1  packages/api-utils/docs/content/worker.html
  169. +1 −1  packages/api-utils/docs/cortex.html
  170. +1 −1  packages/api-utils/docs/cuddlefish.html
  171. +1 −1  packages/api-utils/docs/e10s.html
  172. +1 −1  packages/api-utils/docs/errors.html
  173. +1 −1  packages/api-utils/docs/es5.html
  174. +1 −1  packages/api-utils/docs/events.html
  175. +1 −1  packages/api-utils/docs/file.html
  176. +1 −1  packages/api-utils/docs/hidden-frame.html
  177. +1 −1  packages/api-utils/docs/light-traits.html
  178. +1 −1  packages/api-utils/docs/list.html
  179. +1 −1  packages/api-utils/docs/match-pattern.html
  180. +1 −1  packages/api-utils/docs/memory.html
  181. +1 −1  packages/api-utils/docs/observer-service.html
  182. +1 −1  packages/api-utils/docs/plain-text-console.html
  183. +1 −1  packages/api-utils/docs/preferences-service.html
  184. +1 −1  packages/api-utils/docs/securable-module.html
  185. +1 −1  packages/api-utils/docs/tab-browser.html
  186. +1 −1  packages/api-utils/docs/text-streams.html
  187. +1 −1  packages/api-utils/docs/traceback.html
  188. +1 −1  packages/api-utils/docs/traits.html
  189. +1 −1  packages/api-utils/docs/unit-test.html
  190. +1 −1  packages/api-utils/docs/unload.html
  191. +1 −1  packages/api-utils/docs/url.html
  192. +14 −1 packages/api-utils/docs/window-utils.html
  193. +7 −0 packages/api-utils/docs/window-utils.md
  194. +13 −0 packages/api-utils/docs/window-utils.md.div
  195. +1 −1  packages/api-utils/docs/window-utils.md.json
  196. +2 −2 packages/api-utils/docs/xhr.html
  197. +1 −1  packages/api-utils/docs/xhr.md
  198. +1 −1  packages/api-utils/docs/xhr.md.div
  199. +1 −1  packages/api-utils/docs/xhr.md.json
  200. +1 −1  packages/api-utils/docs/xpcom.html
  201. +1 −1  packages/api-utils/docs/xul-app.html
  202. +1 −1  packages/development-mode/README.md
  203. +3 −3 packages/development-mode/development-mode.html
  204. +1 −1  packages/development-mode/docs/bootstrap.html
  205. +1 −1  packages/development-mode/docs/main.html
  206. +1 −1  packages/index.json
  207. +1 −1  packages/test-harness/docs/harness.html
  208. +1 −1  packages/test-harness/docs/run-tests.html
  209. +2 −2 packages/test-harness/test-harness.html
  210. 0  syntaxhighlighter/MIT-LICENSE
  211. 0  syntaxhighlighter/scripts/shBrushCss.js
  212. 0  syntaxhighlighter/scripts/shBrushJScript.js
  213. 0  syntaxhighlighter/scripts/shBrushXml.js
  214. 0  syntaxhighlighter/scripts/shCore.js
  215. 0  syntaxhighlighter/styles/shCore.css
  216. 0  syntaxhighlighter/styles/shThemeDefault.css
View
0  base.html 100644 → 100755
File mode changed
View
0  css/api-reference.css 100644 → 100755
File mode changed
View
0  css/base.css 100644 → 100755
File mode changed
View
0  css/footer.css 100644 → 100755
File mode changed
View
0  css/header.css 100644 → 100755
File mode changed
View
0  css/sdk-docs.css 100644 → 100755
File mode changed
View
2  dev-guide/addon-development/about.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/annotator/annotator.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/annotator/creating.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/annotator/displaying.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/annotator/overview.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/annotator/storing.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/annotator/widget.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/api-idioms.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/api-intro.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
7 dev-guide/addon-development/api-modules.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -191,7 +191,10 @@
<a href="packages/addon-kit/docs/panel.html"><code>panel</code></a> you can store the files in your
<code>data</code> directory and retrieve them using <code>self</code>.</p>
<p>This module also gives your add-on access to its <a href="dev-guide/addon-development/program-id.html">Program
-ID</a>.</p></div>
+ID</a>.</p>
+<p>Note that the <code>self</code> module is completely different from the global <code>self</code>
+object accessible to content scripts, which is used by a content script to
+<a href="dev-guide/addon-development/web-content#content_script_events">communicate with the add-on code</a>.</p></div>
</div>
<div id="sidebar" class="column">
View
2  dev-guide/addon-development/cfx-tool.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
17 dev-guide/addon-development/commonjs.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -76,6 +76,18 @@
</li>
</ul>
<p><img alt="CommonJS modules" src="media/commonjs-modules.jpg" /></p>
+<p>The SDK
+<a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/freeze">freezes</a>
+the <code>exports</code> object returned by <code>require</code>. So a if you import a module using
+<code>require</code>, you can't change the properties of the object returned:</p>
+<pre><code>self = require("self");
+// Attempting to define a new property
+// will fail, or throw an exception in strict mode
+self.foo = 1;
+// Attempting to modify an existing property
+// will fail, or throw an exception in strict mode
+self.data = "foo";
+</code></pre>
<h2>CommonJS Packages</h2>
<p>A CommonJS <strong>package</strong> is a structure which can wrap a collection of related
modules: this makes it easier to distribute, install and manage modules.</p>
@@ -98,8 +110,7 @@
<p>According to the CommonJS specification, if a module called <code>main</code> exists in a
CommonJS package, that module will be evaluated as soon as your program is
loaded. For an add-on, that means that the <code>main</code> module will be evaluated as
-soon as the host application (such as Firefox) has enabled your program as an
-extension.</p>
+soon as Firefox has enabled the add-on.</p>
<p>So in terms of CommonJS objects the translator consists of a package that
contains a single module called <code>main</code>, and which imports three SDK modules:</p>
<p><img alt="CommonJS translator" src="media/commonjs-translator.jpg" /></p>
View
2  dev-guide/addon-development/console.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/events.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/getting-started.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/guides.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/implementing-reusable-module.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
4 dev-guide/addon-development/implementing-simple-addon.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -244,7 +244,7 @@
<p>Note the calls to <code>console.log()</code> here. <code>console</code> is a global object accessible
by any module, which you can use to write error, warning, or informational
messages.</p>
-<p>For an extension which has been packaged as an XPI file and installed into
+<p>For an add-on which has been packaged as an XPI file and installed into
Firefox, the messages are sent to Firefox's
<a href="https://developer.mozilla.org/en/Error_Console">Error Console</a>. If you are
launching Firefox from the command line using <code>cfx</code>, as you will be for
View
70 dev-guide/addon-development/installation.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -56,6 +56,7 @@
<div id="main-content-column" class="column">
<div id="toc"></div>
<div id="main-content"><h1>Installation</h1>
+<h2>Prerequisites</h2>
<p>To develop with the Add-on SDK, you'll need:</p>
<ul>
<li>
@@ -63,51 +64,80 @@
of Python are not supported. Make sure that Python is in your path.</p>
</li>
<li>
-<p>A version of Firefox that uses Gecko 2.0.0.7 or later
- (for example, Firefox 4.0).</p>
+<p>Firefox version 4.0 or later.</p>
</li>
</ul>
-<p>At the moment, the latest stable version of the Add-on SDK is 1.0.
+<p>At the moment, the latest stable version of the Add-on SDK is 1.1.
You can obtain it as a
<a href="https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/jetpack-sdk-latest.tar.gz">tarball</a>
or a <a href="https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/jetpack-sdk-latest.zip">zip file</a>.
Alternatively, you can get the latest development version of the
Add-on SDK from its <a href="https://github.com/mozilla/addon-sdk">GitHub repository</a>.</p>
+<h2>Installation on Mac OS X / Linux</h2>
<p>Extract the file contents wherever you choose, and navigate to the root
directory of the SDK with a shell/command prompt. For example:</p>
<pre>
- ~/mozilla > tar -xf addon-sdk-1.0.tar.gz
- ~/mozilla > cd addon-sdk-1.0
- ~/mozilla/addon-sdk-1.0 >
+ ~/mozilla > tar -xf addon-sdk-1.1.tar.gz
+ ~/mozilla > cd addon-sdk-1.1
+ ~/mozilla/addon-sdk-1.1 >
</pre>
-<p>Then, if you're on Linux, OS X, or another Unix-based system, run:</p>
+<p>Then run:</p>
<pre>
- ~/mozilla/addon-sdk-1.0 > source bin/activate
+ ~/mozilla/addon-sdk-1.1 > source bin/activate
</pre>
-<p>Otherwise, if you're on Windows, run:</p>
+<p>Your command prompt should now have a new prefix containing the name of the
+SDK's root directory:</p>
<pre>
- C:\Users\Mozilla\addon-sdk-1.0> bin\activate
+ (addon-sdk-1.1)~/mozilla/addon-sdk-1.1 >
</pre>
-<p>Now the beginning of your command prompt should contain the text
-<code>(addon-sdk)</code>, which means that your shell has entered a special
-virtual environment that gives you access to the Add-on SDK's
-command-line tools.</p>
-<p>At any time, you can leave a virtual environment by running
-<code>deactivate</code>.</p>
+<h2>Installation on Windows</h2>
+<p>Extract the file contents wherever you choose, and navigate to the root
+directory of the SDK with a shell/command prompt. For example:</p>
+<pre>
+ C:\Users\mozilla\sdk>7z.exe x addon-sdk-1.1.zip
+ C:\Users\mozilla\sdk>cd addon-sdk-1.1
+ C:\Users\mozilla\sdk\addon-sdk-1.1>
+</pre>
+
+<p>Then run:</p>
+<pre>
+ C:\Users\mozilla\sdk\addon-sdk-1.1>bin\activate
+</pre>
+
+<p>You might see an error like this:</p>
+<pre>
+ ERROR: The system was unable to find the specified registry key or value.
+</pre>
+
+<p>This is a known issue, being tracked as
+<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=574563">bug 574563</a>, and should
+not affect the proper functioning of the SDK at all.</p>
+<p>Your command prompt should now have a new prefix containing the full path to
+the SDK's root directory:</p>
+<pre>
+ (C:\Users\mozilla\sdk\addon-sdk-1.1) C:\Users\Work\sdk\addon-sdk-1.1>
+</pre>
+
+<h2>SDK Virtual Environment</h2>
+<p>The new prefix to your command prompt indicates that your shell has entered
+a virtual environment that gives you access to the Add-on SDK's command-line
+tools.</p>
+<p>At any time, you can leave a virtual environment by running <code>deactivate</code>.</p>
<p>The virtual environment is specific to this particular command prompt. If you
close this command prompt, it is deactivated and you need to type
-<code>source bin/activate</code> in a new command prompt to reactivate it. If
-you open a new command prompt, the SDK will not be active in the new prompt.</p>
+<code>source bin/activate</code> or <code>bin\activate</code> in a new command prompt to reactivate
+it. If you open a new command prompt, the SDK will not be active in the new
+prompt.</p>
<p>You can have multiple copies of the SDK in different locations on disk and
switch between them, or even have them both activated in different command
prompts at the same time.</p>
<h2>Sanity Check</h2>
<p>Run this at your shell prompt:</p>
<pre>
- ~/mozilla/addon-sdk-1.0 > cfx
+ ~/mozilla/addon-sdk-1.1 > cfx
</pre>
<p>It should produce output whose first line looks something like this, followed by
View
2  dev-guide/addon-development/module-search.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
18 dev-guide/addon-development/package-spec.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -67,23 +67,23 @@
one package with a given name. This name cannot contain spaces or periods.
The name defaults to the name of the parent directory. If the package is
ever built as an XPI and the <code>fullName</code> key is not present, this is
- used as the extension's <code>em:name</code> element in its <code>install.rdf</code>.</p>
+ used as the add-on's <code>em:name</code> element in its <code>install.rdf</code>.</p>
</li>
<li>
<p><code>fullName</code> - the full name of the package. It can contain spaces. If
- the package is ever built as an XPI, this is used as the extension's
+ the package is ever built as an XPI, this is used as the add-on's
<code>em:name</code> element in its <code>install.rdf</code>.</p>
</li>
<li>
<p><code>description</code> - a String describing the package. If the package is
- ever built as an XPI, this is used as the extension's
+ ever built as an XPI, this is used as the add-on's
<code>em:description</code> element in its <code>install.rdf</code>.</p>
</li>
<li>
<p><code>author</code> - the original author of the package. The author may be a
String including an optional URL in parentheses and optional email
address in angle brackets. If the package is ever built as an XPI,
- this is used as the extension's <code>em:creator</code> element in its
+ this is used as the add-on's <code>em:creator</code> element in its
<code>install.rdf</code>.</p>
</li>
<li>
@@ -96,13 +96,13 @@
<p><code>icon</code> - the relative path from the root of the package to a
PNG file containing the icon for the package. By default, this
is <code>icon.png</code>. If the package is built as an XPI, this is used
- as the extension's icon to display in the Add-on Manager's add-ons list.</p>
+ as the add-on's icon to display in the Add-on Manager's add-ons list.</p>
</li>
<li>
<p><code>icon64</code> - the relative path from the root of the package to a
PNG file containing the icon64 for the package. By default, this
is <code>icon64.png</code>. If the package is built as an XPI, this is used
- as the extension's icon to display in the Addon Manager's add-on details view.</p>
+ as the add-on's icon to display in the Addon Manager's add-on details view.</p>
</li>
<li>
<p><code>license</code> - the name of the license as a String, with an optional
@@ -112,12 +112,12 @@
<p><code>id</code> - a globally unique identifier for the package, a String
derived from the public half of a private/public keypair, generated
the first time you run <code>cfx xpi</code>. When the package is built as an
- XPI, this is used as the extension's <code>em:id</code> element in its
+ XPI, this is used as the add-on's <code>em:id</code> element in its
<code>install.rdf</code>.</p>
</li>
<li>
<p><code>version</code> - a String representing the version of the package. If the
- package is ever built as an XPI, this is used as the extension's
+ package is ever built as an XPI, this is used as the add-on's
<code>em:version</code> element in its <code>install.rdf</code>.</p>
</li>
<li>
View
2  dev-guide/addon-development/program-id.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/reference.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/troubleshooting.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/tutorials.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/addon-development/two-types-of-scripts.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
5 dev-guide/addon-development/web-content.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -218,6 +218,9 @@
<p>Events are asynchronous: that is, the sender does not wait for a reply from
the recipient but just emits the event and continues processing.</p>
<h3>Accessing <code>port</code> in the Content Script</h3>
+<p><span class="aside">Note that the global <code>self</code> object is completely different from the
+<a href="packages/addon-kit/docs/self.html"><code>self</code> module</a>, which provides an API for an add-on to
+access its data files and ID.</span></p>
<p>In the content script the <code>port</code> object is available as a property of the
global <code>self</code> object. Thus, to emit an event from a content script:</p>
<pre><code>self.port.emit("myContentScriptEvent", myContentScriptEventPayload);
View
6 dev-guide/appendices/credits.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -60,6 +60,7 @@
<ul>
<li>Adamantium</li>
<li>Ehsan Akhgari</li>
+<li>arky</li>
<li><a href="https://github.com/harthur">Heather Arthur</a></li>
<li>Dietrich Ayala</li>
<li><a href="https://github.com/Niamor">Romain B</a></li>
@@ -74,6 +75,7 @@
<li>Felipe Gomes</li>
<li>Irakli Gozalishvili</li>
<li>Luca Greco</li>
+<li>Mark Hammond</li>
<li>Lloyd Hilaiel</li>
<li>Bobby Holley</li>
<li>Eric H. Jung</li>
@@ -99,7 +101,7 @@
<li>Dave Townsend</li>
<li>Peter Van der Beken</li>
<li>Atul Varma</li>
-<li>Erik Vold</li>
+<li><a href="https://github.com/erikvold">Erik Vold</a></li>
<li>Vladimir Vukicevic</li>
<li>Brian Warner</li>
<li><a href="https://github.com/hwiechers">Henri Wiechers</a></li>
View
9 dev-guide/appendices/glossary.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -56,14 +56,13 @@
<div id="main-content-column" class="column">
<div id="toc"></div>
<div id="main-content"><h1>Glossary</h1>
-<p>Terminology is important. Here's a glossary of terms used for the SDK
-so all developers speak the same language.</p>
+<p>This glossary contains a list of terms used in the Add-on SDK.</p>
<p><strong>Add-on</strong>: A software package that adds functionality to a Mozilla application,
which can be built with either Mozilla's traditional add-on platform or the SDK.</p>
<p><strong>Add-on SDK</strong>: A toolchain and associated applications for developing add-ons.</p>
<p><strong>API Utils</strong>: A small, self-contained set of low-level modules that forms
the base functionality for the SDK. The library can be "bootstrapped" into
-any Mozilla application or extension.</p>
+any Mozilla application or add-on.</p>
<p><strong>CFX</strong>: A command-line build, testing, and packaging tool for SDK-based code.</p>
<p><strong>CommonJS</strong>: A specification for a cross-platform JavaScript module
system and standard library. <a href="http://commonjs.org/">Web site</a>.</p>
@@ -105,7 +104,7 @@
<p><strong>Package</strong>: A directory structure containing modules,
documentation, tests, and related metadata. If a package contains
a program and includes proper metadata, it can be built into
-a Mozilla application or extension.</p>
+a Mozilla application or add-on.</p>
<p><strong>Program</strong>: A module named <code>main</code> that optionally exports
a <code>main()</code> function. This module is intended either to start an application for
an end-user or add features to an existing application.</p>
View
2  dev-guide/module-development/about.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
18 dev-guide/module-development/best-practices.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -68,27 +68,27 @@
<li>
<p><strong>Easy to debug</strong>. It needs to be easy for a developer to figure
out why something they're doing isn't working. To this end,
- whenever an exception is raised by a SDK-based extension, it
+ whenever an exception is raised by a SDK-based add-on, it
should be logged in a place that is specific to that
- extension--so that a developer can distinguish it from an error on
- a web page or in another extension, for instance. We also want it
+ add-on--so that a developer can distinguish it from an error on
+ a web page or in another add-on, for instance. We also want it
to be logged with a full stack traceback, which the Mozilla
platform doesn't usually do.</p>
</li>
<li>
-<p><strong>Reloadable</strong>. A SDK-based extension can be asked to unload
+<p><strong>Reloadable</strong>. A SDK-based add-on can be asked to unload
itself at any time, e.g. because the user decides to
- uninstall or disable the extension. In order to do this,
+ uninstall or disable the add-on. In order to do this,
to keep track of the resources currently being used by
- the extension's code, and be ready to free them at a moment's
+ the add-on's code, and be ready to free them at a moment's
notice.</p>
</li>
<li>
-<p><strong>Side by Side</strong>. Currently, SDK-based extensions actually
+<p><strong>Side by Side</strong>. Currently, SDK-based add-ons actually
operate in their own private instance of the SDK runtime.
While this may be consolidated in the future to optimize resource
use, it may still be the case that two different SDK-based
- extensions may need to use different versions of the same module.
+ add-ons may need to use different versions of the same module.
This means that multiple instances of different versions of
the same module may exist in an application at once.</p>
</li>
View
2  dev-guide/module-development/chrome.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/module-development/e10s.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/module-development/globals.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/module-development/guides.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/module-development/reference.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  dev-guide/module-development/tutorials.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
6 dev-guide/module-development/xpi.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -83,7 +83,7 @@
<p>A template different than the default can be specified via the
<code>cfx</code> tool's <code>--templatedir</code> option.</p>
<h2>The Generated XPI</h2>
-<p>When we run <code>cfx xpi</code> to build the <code>aardvark</code> package into an extension,
+<p>When we run <code>cfx xpi</code> to build the <code>aardvark</code> package into an add-on,
<code>aardvark</code>'s dependencies are calculated, and a XPI file is generated that
combines all required packages, the XPI template, and a few other
auto-generated files:</p>
@@ -99,7 +99,7 @@
<p>In an actual XPI built by the SDK, the string <code>"guid"</code> in these
examples is a unique identifier that the SDK prepends to all
<code>resource:</code> URIs to namespace the XPI's resources so they don't
-collide with anything else, including other extensions built by the
+collide with anything else, including other add-ons built by the
SDK and containing the same packages. This GUID is built from the
<a href="dev-guide/addon-development/program-id.html">Program ID</a>.</p>
<p>By default, the generated XPI contains every module from each package that is
View
2  dev-guide/welcome.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
2  index.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
0  js/jquery.js 100644 → 100755
File mode changed
View
0  js/main.js 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/about.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/annotator/annotator.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/annotator/creating.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/annotator/displaying.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/annotator/overview.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/annotator/storing.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/annotator/widget.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/api-idioms.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/api-intro.md 100644 → 100755
File mode changed
View
4 md/dev-guide/addon-development/api-modules.md 100644 → 100755
@@ -193,3 +193,7 @@ your add-on includes an icon or some HTML content to display in a
This module also gives your add-on access to its [Program
ID](dev-guide/addon-development/program-id.html).
+
+Note that the `self` module is completely different from the global `self`
+object accessible to content scripts, which is used by a content script to
+[communicate with the add-on code](dev-guide/addon-development/web-content#content_script_events).
View
0  md/dev-guide/addon-development/cfx-tool.md 100644 → 100755
File mode changed
View
16 md/dev-guide/addon-development/commonjs.md 100644 → 100755
@@ -21,6 +21,19 @@ SDK modules it uses.
![CommonJS modules](media/commonjs-modules.jpg)
+The SDK
+[freezes](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/freeze)
+the `exports` object returned by `require`. So a if you import a module using
+`require`, you can't change the properties of the object returned:
+
+ self = require("self");
+ // Attempting to define a new property
+ // will fail, or throw an exception in strict mode
+ self.foo = 1;
+ // Attempting to modify an existing property
+ // will fail, or throw an exception in strict mode
+ self.data = "foo";
+
## CommonJS Packages ##
A CommonJS **package** is a structure which can wrap a collection of related
@@ -44,8 +57,7 @@ CommonJS modules, and a complete add-on is a CommonJS package.
According to the CommonJS specification, if a module called `main` exists in a
CommonJS package, that module will be evaluated as soon as your program is
loaded. For an add-on, that means that the `main` module will be evaluated as
-soon as the host application (such as Firefox) has enabled your program as an
-extension.
+soon as Firefox has enabled the add-on.
So in terms of CommonJS objects the translator consists of a package that
contains a single module called `main`, and which imports three SDK modules:
View
0  md/dev-guide/addon-development/console.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/events.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/getting-started.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/guides.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/implementing-reusable-module.md 100644 → 100755
File mode changed
View
2  md/dev-guide/addon-development/implementing-simple-addon.md 100644 → 100755
@@ -208,7 +208,7 @@ Note the calls to `console.log()` here. `console` is a global object accessible
by any module, which you can use to write error, warning, or informational
messages.
-For an extension which has been packaged as an XPI file and installed into
+For an add-on which has been packaged as an XPI file and installed into
Firefox, the messages are sent to Firefox's
[Error Console](https://developer.mozilla.org/en/Error_Console). If you are
launching Firefox from the command line using `cfx`, as you will be for
View
77 md/dev-guide/addon-development/installation.md 100644 → 100755
@@ -1,53 +1,92 @@
# Installation #
+## Prerequisites
+
To develop with the Add-on SDK, you'll need:
* [Python](http://www.python.org/) 2.5 or 2.6. Note that versions 3.0 and 3.1
of Python are not supported. Make sure that Python is in your path.
-* A version of Firefox that uses Gecko 2.0.0.7 or later
- (for example, Firefox 4.0).
+* Firefox version 4.0 or later.
-At the moment, the latest stable version of the Add-on SDK is 1.0.
+At the moment, the latest stable version of the Add-on SDK is 1.1.
You can obtain it as a
[tarball](https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/jetpack-sdk-latest.tar.gz)
or a [zip file](https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/jetpack-sdk-latest.zip).
Alternatively, you can get the latest development version of the
Add-on SDK from its [GitHub repository](https://github.com/mozilla/addon-sdk).
+## Installation on Mac OS X / Linux ##
+
Extract the file contents wherever you choose, and navigate to the root
directory of the SDK with a shell/command prompt. For example:
<pre>
- ~/mozilla > tar -xf addon-sdk-1.0.tar.gz
- ~/mozilla > cd addon-sdk-1.0
- ~/mozilla/addon-sdk-1.0 >
+ ~/mozilla > tar -xf addon-sdk-1.1.tar.gz
+ ~/mozilla > cd addon-sdk-1.1
+ ~/mozilla/addon-sdk-1.1 >
+</pre>
+
+Then run:
+
+<pre>
+ ~/mozilla/addon-sdk-1.1 > source bin/activate
</pre>
-Then, if you're on Linux, OS X, or another Unix-based system, run:
+Your command prompt should now have a new prefix containing the name of the
+SDK's root directory:
<pre>
- ~/mozilla/addon-sdk-1.0 > source bin/activate
+ (addon-sdk-1.1)~/mozilla/addon-sdk-1.1 >
</pre>
-Otherwise, if you're on Windows, run:
+## Installation on Windows ##
+
+Extract the file contents wherever you choose, and navigate to the root
+directory of the SDK with a shell/command prompt. For example:
<pre>
- C:\Users\Mozilla\addon-sdk-1.0> bin\activate
+ C:\Users\mozilla\sdk>7z.exe x addon-sdk-1.1.zip
+ C:\Users\mozilla\sdk>cd addon-sdk-1.1
+ C:\Users\mozilla\sdk\addon-sdk-1.1>
</pre>
-Now the beginning of your command prompt should contain the text
-`(addon-sdk)`, which means that your shell has entered a special
-virtual environment that gives you access to the Add-on SDK's
-command-line tools.
+Then run:
+
+<pre>
+ C:\Users\mozilla\sdk\addon-sdk-1.1>bin\activate
+</pre>
+
+You might see an error like this:
+
+<pre>
+ ERROR: The system was unable to find the specified registry key or value.
+</pre>
+
+This is a known issue, being tracked as
+[bug 574563](https://bugzilla.mozilla.org/show_bug.cgi?id=574563), and should
+not affect the proper functioning of the SDK at all.
+
+Your command prompt should now have a new prefix containing the full path to
+the SDK's root directory:
+
+<pre>
+ (C:\Users\mozilla\sdk\addon-sdk-1.1) C:\Users\Work\sdk\addon-sdk-1.1>
+</pre>
+
+## SDK Virtual Environment ##
+
+The new prefix to your command prompt indicates that your shell has entered
+a virtual environment that gives you access to the Add-on SDK's command-line
+tools.
-At any time, you can leave a virtual environment by running
-`deactivate`.
+At any time, you can leave a virtual environment by running `deactivate`.
The virtual environment is specific to this particular command prompt. If you
close this command prompt, it is deactivated and you need to type
-`source bin/activate` in a new command prompt to reactivate it. If
-you open a new command prompt, the SDK will not be active in the new prompt.
+`source bin/activate` or `bin\activate` in a new command prompt to reactivate
+it. If you open a new command prompt, the SDK will not be active in the new
+prompt.
You can have multiple copies of the SDK in different locations on disk and
switch between them, or even have them both activated in different command
@@ -58,7 +97,7 @@ prompts at the same time.
Run this at your shell prompt:
<pre>
- ~/mozilla/addon-sdk-1.0 > cfx
+ ~/mozilla/addon-sdk-1.1 > cfx
</pre>
It should produce output whose first line looks something like this, followed by
View
0  md/dev-guide/addon-development/module-search.md 100644 → 100755
File mode changed
View
16 md/dev-guide/addon-development/package-spec.md 100644 → 100755
@@ -12,20 +12,20 @@ called `package.json`. This file is also referred to as the
one package with a given name. This name cannot contain spaces or periods.
The name defaults to the name of the parent directory. If the package is
ever built as an XPI and the `fullName` key is not present, this is
- used as the extension's `em:name` element in its `install.rdf`.
+ used as the add-on's `em:name` element in its `install.rdf`.
* `fullName` - the full name of the package. It can contain spaces. If
- the package is ever built as an XPI, this is used as the extension's
+ the package is ever built as an XPI, this is used as the add-on's
`em:name` element in its `install.rdf`.
* `description` - a String describing the package. If the package is
- ever built as an XPI, this is used as the extension's
+ ever built as an XPI, this is used as the add-on's
`em:description` element in its `install.rdf`.
* `author` - the original author of the package. The author may be a
String including an optional URL in parentheses and optional email
address in angle brackets. If the package is ever built as an XPI,
- this is used as the extension's `em:creator` element in its
+ this is used as the add-on's `em:creator` element in its
`install.rdf`.
* `contributors` - may be an Array of additional author Strings.
@@ -35,12 +35,12 @@ called `package.json`. This file is also referred to as the
* `icon` - the relative path from the root of the package to a
PNG file containing the icon for the package. By default, this
is `icon.png`. If the package is built as an XPI, this is used
- as the extension's icon to display in the Add-on Manager's add-ons list.
+ as the add-on's icon to display in the Add-on Manager's add-ons list.
* `icon64` - the relative path from the root of the package to a
PNG file containing the icon64 for the package. By default, this
is `icon64.png`. If the package is built as an XPI, this is used
- as the extension's icon to display in the Addon Manager's add-on details view.
+ as the add-on's icon to display in the Addon Manager's add-on details view.
* `license` - the name of the license as a String, with an optional
URL in parentheses.
@@ -48,11 +48,11 @@ called `package.json`. This file is also referred to as the
* `id` - a globally unique identifier for the package, a String
derived from the public half of a private/public keypair, generated
the first time you run `cfx xpi`. When the package is built as an
- XPI, this is used as the extension's `em:id` element in its
+ XPI, this is used as the add-on's `em:id` element in its
`install.rdf`.
* `version` - a String representing the version of the package. If the
- package is ever built as an XPI, this is used as the extension's
+ package is ever built as an XPI, this is used as the add-on's
`em:version` element in its `install.rdf`.
* `dependencies` - a String or Array of Strings representing package
View
0  md/dev-guide/addon-development/program-id.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/reference.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/troubleshooting.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/tutorials.md 100644 → 100755
File mode changed
View
0  md/dev-guide/addon-development/two-types-of-scripts.md 100644 → 100755
File mode changed
View
3  md/dev-guide/addon-development/web-content.md 100644 → 100755
@@ -184,6 +184,9 @@ the recipient but just emits the event and continues processing.
### Accessing `port` in the Content Script ###
+<span class="aside">Note that the global `self` object is completely different from the
+[`self` module](packages/addon-kit/docs/self.html), which provides an API for an add-on to
+access its data files and ID.</span>
In the content script the `port` object is available as a property of the
global `self` object. Thus, to emit an event from a content script:
View
4 md/dev-guide/appendices/credits.md 100644 → 100755
@@ -4,6 +4,7 @@ We'd like to thank our many Jetpack project contributors! They include:
* Adamantium
* Ehsan Akhgari
+* arky
* [Heather Arthur](https://github.com/harthur)
* Dietrich Ayala
* [Romain B](https://github.com/Niamor)
@@ -18,6 +19,7 @@ We'd like to thank our many Jetpack project contributors! They include:
* Felipe Gomes
* Irakli Gozalishvili
* Luca Greco
+* Mark Hammond
* Lloyd Hilaiel
* Bobby Holley
* Eric H. Jung
@@ -43,7 +45,7 @@ We'd like to thank our many Jetpack project contributors! They include:
* Dave Townsend
* Peter Van der Beken
* Atul Varma
-* Erik Vold
+* [Erik Vold](https://github.com/erikvold)
* Vladimir Vukicevic
* Brian Warner
* [Henri Wiechers](https://github.com/hwiechers)
View
7 md/dev-guide/appendices/glossary.md 100644 → 100755
@@ -1,7 +1,6 @@
# Glossary #
-Terminology is important. Here's a glossary of terms used for the SDK
-so all developers speak the same language.
+This glossary contains a list of terms used in the Add-on SDK.
__Add-on__: A software package that adds functionality to a Mozilla application,
which can be built with either Mozilla's traditional add-on platform or the SDK.
@@ -10,7 +9,7 @@ __Add-on SDK__: A toolchain and associated applications for developing add-ons.
__API Utils__: A small, self-contained set of low-level modules that forms
the base functionality for the SDK. The library can be "bootstrapped" into
-any Mozilla application or extension.
+any Mozilla application or add-on.
__CFX__: A command-line build, testing, and packaging tool for SDK-based code.
@@ -62,7 +61,7 @@ or an Unprivileged Module.
__Package__: A directory structure containing modules,
documentation, tests, and related metadata. If a package contains
a program and includes proper metadata, it can be built into
-a Mozilla application or extension.
+a Mozilla application or add-on.
__Program__: A module named `main` that optionally exports
a `main()` function. This module is intended either to start an application for
View
0  md/dev-guide/module-development/about.md 100644 → 100755
File mode changed
View
16 md/dev-guide/module-development/best-practices.md 100644 → 100755
@@ -12,25 +12,25 @@ characteristics:
* **Easy to debug**. It needs to be easy for a developer to figure
out why something they're doing isn't working. To this end,
- whenever an exception is raised by a SDK-based extension, it
+ whenever an exception is raised by a SDK-based add-on, it
should be logged in a place that is specific to that
- extension--so that a developer can distinguish it from an error on
- a web page or in another extension, for instance. We also want it
+ add-on--so that a developer can distinguish it from an error on
+ a web page or in another add-on, for instance. We also want it
to be logged with a full stack traceback, which the Mozilla
platform doesn't usually do.
- * **Reloadable**. A SDK-based extension can be asked to unload
+ * **Reloadable**. A SDK-based add-on can be asked to unload
itself at any time, e.g. because the user decides to
- uninstall or disable the extension. In order to do this,
+ uninstall or disable the add-on. In order to do this,
to keep track of the resources currently being used by
- the extension's code, and be ready to free them at a moment's
+ the add-on's code, and be ready to free them at a moment's
notice.
- * **Side by Side**. Currently, SDK-based extensions actually
+ * **Side by Side**. Currently, SDK-based add-ons actually
operate in their own private instance of the SDK runtime.
While this may be consolidated in the future to optimize resource
use, it may still be the case that two different SDK-based
- extensions may need to use different versions of the same module.
+ add-ons may need to use different versions of the same module.
This means that multiple instances of different versions of
the same module may exist in an application at once.
View
0  md/dev-guide/module-development/chrome.md 100644 → 100755
File mode changed
View
0  md/dev-guide/module-development/e10s.md 100644 → 100755
File mode changed
View
0  md/dev-guide/module-development/globals.md 100644 → 100755
File mode changed
View
0  md/dev-guide/module-development/guides.md 100644 → 100755
File mode changed
View
0  md/dev-guide/module-development/reference.md 100644 → 100755
File mode changed
View
0  md/dev-guide/module-development/tutorials.md 100644 → 100755
File mode changed
View
4 md/dev-guide/module-development/xpi.md 100644 → 100755
@@ -39,7 +39,7 @@ A template different than the default can be specified via the
The Generated XPI
-----------------
-When we run `cfx xpi` to build the `aardvark` package into an extension,
+When we run `cfx xpi` to build the `aardvark` package into an add-on,
`aardvark`'s dependencies are calculated, and a XPI file is generated that
combines all required packages, the XPI template, and a few other
auto-generated files:
@@ -58,7 +58,7 @@ mapped to `resource://guid-api-utils-lib/` and
In an actual XPI built by the SDK, the string `"guid"` in these
examples is a unique identifier that the SDK prepends to all
`resource:` URIs to namespace the XPI's resources so they don't
-collide with anything else, including other extensions built by the
+collide with anything else, including other add-ons built by the
SDK and containing the same packages. This GUID is built from the
[Program ID](dev-guide/addon-development/program-id.html).
View
0  md/dev-guide/welcome.md 100644 → 100755
File mode changed
View
0  media/annotator/annotation-list.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/annotation-panel.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/annotator-design.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/editor-panel.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/highlight.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/matcher.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/pencil-off.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/pencil-on.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/annotator/widget-icon.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/bg-footer.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/bg-header.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/commonjs-modules.jpg 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/commonjs-translator.jpg 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/content-scripting-events.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/content-scripting-overview.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/favicon.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/firefox-32.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/firefox-logo.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/footer-logo-med.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/mozilla-tab.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/multiple-workers.jpg 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/screenshots/default-panel-osx.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/screenshots/default-panel-ubuntu.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/screenshots/default-panel-windows.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/screenshots/modules/context-menu-image-osx.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  media/screenshots/modules/notification-growl-osx.png 100644 → 100755
Diff not rendered
View
0  media/screenshots/modules/panel-tabs-osx.png 100644 → 100755
Diff not rendered
View
0  media/screenshots/modules/widget-content-osx.png 100644 → 100755
Diff not rendered
View
0  media/screenshots/modules/widget-icon-osx.png 100644 → 100755
Diff not rendered
View
0  media/screenshots/modules/widget-panel-osx.png 100644 → 100755
Diff not rendered
View
0  media/screenshots/translator/context-menu-osx.png 100644 → 100755
Diff not rendered
View
0  media/screenshots/translator/translated-osx.png 100644 → 100755
Diff not rendered
View
BIN  media/screenshots/widget-panel-clock.png
Diff not rendered
View
0  media/twitter-widget.png 100644 → 100755
Diff not rendered
View
4 packages/addon-kit/addon-kit.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -77,7 +77,7 @@
</td>
<td>
-<span class="version">1.0</span>
+<span class="version">1.1</span>
</td>
</tr>
View
2  packages/addon-kit/docs/clipboard.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
View
317 packages/addon-kit/docs/context-menu.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
- <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/" >
+ <base href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script>
@@ -68,18 +68,18 @@
submenus, and menu separators.</p>
<p>Instead of manually adding items when particular contexts occur and then
removing them when those contexts go away, you <em>bind</em> items to contexts, and the
-adding and removing is automatically handled for you.</p>
-<p>Items are bound to contexts in much the same way that event listeners are bound
-to events. When the user invokes the context menu, all of the items bound to
-the current context are automatically added to the menu. If no items are bound,
-none are added. Likewise, any items that were previously in the menu but are
-not bound to the current context are automatically removed from the menu. You
-never need to manually remove your items from the menu unless you want them to
-never appear again.</p>
-<p>For example, if your extension needs to add a context menu item whenever the
+adding and removing is automatically handled for you. Items are bound to
+contexts in much the same way that event listeners are bound to events. When
+the user invokes the context menu, all of the items bound to the current context
+are automatically added to the menu. If no items are bound, none are added.
+Likewise, any items that were previously in the menu but are not bound to the
+current context are automatically removed from the menu. You never need to
+manually remove your items from the menu unless you want them to never appear
+again.</p>
+<p>For example, if your add-on needs to add a context menu item whenever the
user visits a certain page, don't create the item when that page loads, and
-don't remove it when the page unloads. Rather, create your item only once, when
-your program starts, and supply a context that matches the target URL.</p>
+don't remove it when the page unloads. Rather, create your item only once and
+supply a context that matches the target URL.</p>
<h2>Specifying Contexts</h2>
<p>As its name implies, the context menu should be reserved for the occurrence of
specific contexts. Contexts can be related to page content or the page itself,
@@ -90,21 +90,33 @@
or the node the user clicked to open the menu.</p>
<h3>The Page Context</h3>
<p>First of all, you may not need to specify a context at all. When an item does
-not specify a context, the <em>page context</em> applies. The page context occurs
-when the user invokes the context menu on a non-interactive portion of the page.</p>
-<p>Try right-clicking a blank spot in a page, or on text. Make sure that no text
-is selected. The menu that appears should contain the items "Back", "Forward",
-"Reload", "Stop", and so on. This is the page context.</p>
+not specify a context, the page context applies.</p>
+<p>The <em>page context</em> occurs when the user invokes the context menu on a
+non-interactive portion of the page. Try right-clicking a blank spot in this
+page, or on text. Make sure that no text is selected. The menu that appears
+should contain the items "Back", "Forward", "Reload", "Stop", and so on. This
+is the page context.</p>
<p>The page context is appropriate when your item acts on the page as a whole. It
does not occur when the user invokes the context menu on a link, image, or other
non-text node, or while a selection exists.</p>
<h3>Declarative Contexts</h3>
-<p>You can specify some simple, declarative contexts when you construct a menu
-item by setting the <code>context</code> property of the options object passed to its
-constructor. Such contexts may be specified with instances of any of the
-following types. Each is a constructor exported by the <code>context-menu</code> module.</p>
+<p>You can specify some simple, declarative contexts when you create a menu item by
+setting the <code>context</code> property of the options object passed to its constructor,
+like this:</p>
+<pre><code>var cm = require("context-menu");
+cm.Item({
+ label: "My Menu Item",
+ context: cm.URLContext("*.mozilla.org")
+});
+</code></pre>
+<p>These contexts may be specified by calling the following constructors. Each is
+exported by the <code>context-menu</code> module.</p>
<table>
<tr>
+ <th>Constructor</th>
+ <th>Description</th>
+ </tr>
+ <tr>
<td><code>
PageContext()
</code></td>
@@ -117,8 +129,8 @@
SelectionContext()
</code></td>
<td>
- This context occurs when the menu is invoked on a page that contains a
- selection.
+ This context occurs when the menu is invoked on a page in which the user
+ has made a selection.
</td>
</tr>
<tr>
@@ -160,26 +172,32 @@
<p>Menu items also have a <code>context</code> property that can be used to add and remove
declarative contexts after construction. For example:</p>
-<pre><code>var context = contextMenu.SelectorContext("img");
+<pre><code>var context = require("context-menu").SelectorContext("img");
myMenuItem.context.add(context);
myMenuItem.context.remove(context);
</code></pre>
<p>When a menu item is bound to more than one context, it appears in the menu when
all of those contexts occur.</p>
<h3>In Content Scripts</h3>
-<p>To interact with pages in the browser, you create content scripts and pass them
-when constructing menu items. Only items in the top-level context menu can have
-content scripts.</p>
-<p>One of the things you can do in a content script is listen for an event named
-<code>"context"</code>. This event is fired whenever the context menu is about to be
-shown. If your listener returns true, the menu item associated with the content
-script is shown in the menu.</p>