From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- files/de/mozilla/add-ons/sdk/builder/index.html | 16 - .../add-ons/sdk/guides/content_scripts/index.html | 484 -------------------- files/de/mozilla/add-ons/sdk/guides/index.html | 154 ------- files/de/mozilla/add-ons/sdk/index.html | 83 ---- files/de/mozilla/add-ons/sdk/tools/index.html | 14 - files/de/mozilla/add-ons/sdk/tools/jpm/index.html | 497 --------------------- .../adding_a_button_to_the_toolbar/index.html | 100 ----- .../sdk/tutorials/getting_started/index.html | 214 --------- files/de/mozilla/add-ons/sdk/tutorials/index.html | 165 ------- .../add-ons/sdk/tutorials/installation/index.html | 134 ------ .../sdk/tutorials/mobile_development/index.html | 476 -------------------- 11 files changed, 2337 deletions(-) delete mode 100644 files/de/mozilla/add-ons/sdk/builder/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/guides/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tools/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tools/jpm/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tutorials/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tutorials/installation/index.html delete mode 100644 files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html (limited to 'files/de/mozilla/add-ons/sdk') diff --git a/files/de/mozilla/add-ons/sdk/builder/index.html b/files/de/mozilla/add-ons/sdk/builder/index.html deleted file mode 100644 index d243acec45..0000000000 --- a/files/de/mozilla/add-ons/sdk/builder/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Builder -slug: Mozilla/Add-ons/SDK/Builder -tags: - - builder -translation_of: Archive/Add-ons/Add-on_SDK/Builder ---- -

Der Add-on Builder war ein web-basiertes Entwicklungssystem welches Entwicklern erlaubt hat, mit den SDK APIs Addons zu erstellen ohne das cfx Kommando-Zeilen-Tool verwenden zu müssen. Es wurde am 1. April 2014 eingestellt und jetzt leitet es auf die builder.addons.mozilla.org-Seite weiter.
-
- Falls sie bisher das SDK nur über den Builder verwendet haben, wissen sie bereits das meiste, das sie benötigen um direkt mit dem SDK arbeiten zu können. Die high-level und low-level APIs, die für Builder Addons verwendet wurden sind jeweils die gleichen. Mit folgenden Schritten können sie zum SDK wechseln:

- - diff --git a/files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html b/files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html deleted file mode 100644 index a94176f2cb..0000000000 --- a/files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html +++ /dev/null @@ -1,484 +0,0 @@ ---- -title: Content Scripts -slug: Mozilla/Add-ons/SDK/Guides/Content_Scripts -translation_of: Archive/Add-ons/Add-on_SDK/Guides/Content_Scripts ---- -
-

Viele Add-ons müssen den Inhalt von Webseiten modifizieren oder auf diesen zugreifen können. Der Grundcode des Add-on  bekommt aber keinen direkten Zugriff auf Webinhalte. Stattdessen müssen SDK Add-ons den Code,  der Zugriff auf Webinhalte erhält in seperate Skripte auslagern, die sogenannten "Content Scripts". Diese Seite beschreibt wie man Content Scripts entwickelt und diese implementiert.

- -

Content Scripts sind einer der verwirrenderen Aspekte beim Arbeiten mit der SDK, aber Sie werden mit Sicherheit mit ihnen arbeiten müssen. Es gibt fünf grundlegende Prinzipien:

- - - -

Dieses komplette Add-on zeigt alle diese Prinzipien. Die "main.js" hängt ein Content Skript an den aktuellen Tab, mittels den tabs Modules, an. In diesem Fall wird der Content Skript in Form eines Strings übergeben. Das Content Skript ersetzt einfach nur den Inhalt der Seite:

- -
// main.js
-var tabs = require("sdk/tabs");
-var contentScriptString = 'document.body.innerHTML = "<h1>Diese Seite wurde aufgegessen</h1>";'
-
-tabs.activeTab.attach({
-  contentScript: contentScriptString
-});
- -

Die folgenden high-level SDK Module können Content Skripts benutzen, um Webseiten zu bearbeiten:

- - - -

Zusätzlich sind manche SDK Benutzeroberflächen Komponenten - Panel, Sidebar, frames - darauf ausgelegt HTML zu benutzen und haben deshalb seperate Skripte um mit ihrem Inhalt zu interagieren. In vielen Punkten sind diese Skripte wie Content Skripte, aber dies ist nicht Teil dieses Artikels. Um mehr über die Interaktion des Inhalts eines Benutzeroberflächenmoduls zu erfahren, schauen Sie sich die modulspezifischen Dokumentationen: panel, sidebar, frame an.

- -

Fast alle diese Beispiele, die in dieser Anleitung präsentiert werden, sind als komplette, aber minimalistische, Add-ons in der addon-sdk-content-scripts repository auf Github vorhanden.

- -

Content Skripts laden

- -
-

Sie können ein einzelnes Skript laden, indem Sie einen String an die contentScript oder die contentScriptFile Option übergeben. Die contentScript Option behandelt den übergebenen String wie ein eigenes Skript:

- -
// main.js
-
-var pageMod = require("sdk/page-mod");
-var contentScriptValue = 'document.body.innerHTML = ' +
-                         ' "<h1>Page matches ruleset</h1>";';
-
-pageMod.PageMod({
-  include: "*.mozilla.org",
-  contentScript: contentScriptValue
-});
- -

Die contentScriptFile Option behandelt den String wie eine resource:// URL, die auf ein Skript zeigt, dass in ihrem Add-on Verzeichnis "data" gespeichert ist. jpm erstellt standardmäßig keinen "data" Ordner, also muss dieser erst erstellt werden, wenn Sie ihre Content Scripts verwenden wollen.

- -

Das Add-on liefert eine URL, die auf die Datei "content-script.js" zeigt, welche im data Unterordner des Add-on Stammverzeichnisses enthalten ist:

- -
// main.js
-
-var data = require("sdk/self").data;
-var pageMod = require("sdk/page-mod");
-
-pageMod.PageMod({
-  include: "*.mozilla.org",
-  contentScriptFile: data.url("content-script.js")
-});
- -
// content-script.js
-
-document.body.innerHTML = "<h1>Seite erfüllt die Regeln.</h1>";
- -
-

Ab Firefox 34 , kann "./content-script.js" als Alias für self.data.url("content-script.js") verwendet werden. Die main.js kann also auch folgendermaßen geschrieben werden:

- -
var pageMod = require("sdk/page-mod");
-
-pageMod.PageMod({
-  include: "*.mozilla.org",
-  contentScriptFile: "./content-script.js"
-});
-
-
- -
-

Wenn ihr Content Skript nicht sehr simpel ist oder aus einem statischen String besteht, sollten Sie contentScript:  nicht benutzen. Wenn Sie es doch tun, könnten Sie Probleme haben Ihr Add.on auf AMO verifiziert zu bekommmen.

- -

Stattdessen sollten Sie ihr Skript in einer seperaten Datei schreiben und mit contentScriptFile laden. Das macht ihren Code übersichtlicher und er ist einfacher zu Warten, sichern und debuggen.

-
- -

Sie können auch mehrere Skripte in contentScript oder contentScriptFile laden, indem Sie ein Array von Strings übergeben:

- -
// main.js
-
-var tabs = require("sdk/tabs");
-
-tabs.on('ready', function(tab) {
-  tab.attach({
-      contentScript: ['document.body.style.border = "5px solid red";', 'window.alert("hi");']
-  });
-});
-
- -
// main.js
-
-var data = require("sdk/self").data;
-var pageMod = require("sdk/page-mod");
-
-pageMod.PageMod({
-  include: "*.mozilla.org",
-  contentScriptFile: [data.url("jquery.min.js"), data.url("my-content-script.js")]
-});
- -

Wenn Sie das tuen, können die Skripte direkt miteinander kommunizieren, als wären es Skripte der gleichen Webseite.

- -

Sie können auch contentScript und contentScriptFile zusammen benutzen. Wenn Sie das tun, werden die Skripte, die sie in contentScriptFile spezifizieren vor denen in contentScript geladen. Das ermöglicht es Ihnen javaScript Bibliotheken, wie JQuery über eine URL zu laden und dann ein simples Skript inline zu verwenden, dass diese Bibliothek benutzt:

- -
// main.js
-
-var data = require("sdk/self").data;
-var pageMod = require("sdk/page-mod");
-
-var contentScriptString = '$("body").html("<h1>Page matches ruleset</h1>");';
-
-pageMod.PageMod({
-  include: "*.mozilla.org",
-  contentScript: contentScriptString,
-  contentScriptFile: data.url("jquery.js")
-});
- -
-

Wenn ihr Content Skript nicht sehr simpel ist oder aus einem statischen String besteht, sollten Sie contentScript:  nicht benutzen. Wenn Sie es doch tun, könnten Sie Probleme haben Ihr Add.on auf AMO verifiziert zu bekommmen.

- -

Stattdessen sollten Sie ihr Skript in einer seperaten Datei schreiben und mit contentScriptFile laden. Das macht ihren Code übersichtlicher und er ist einfacher zu Warten, sichern und debuggen.

-
- -

Kontrollieren, wann das Skript angehängt werden soll.

- -

Die contentScriptWhen Option spezifiziert, wann das/die Content Skript/e geladen werden sollen. Diese brauch eine dieser Parameter:

- -
    -
  • "start": Läd das Skript sofort, nach dem das Dokumentelement der Seite in den DOM eingefügt wird. ZU diesem Zeitpunkt wurde der DOM Inhalt noch nicht geladen,, deshalb kann das Skript nicht damit interagieren.
  • -
  • "ready": Läd das Skript nachdem der DOM der Seite geladen wurde: Dies ist der Fall, wenn das DOMContentLoaded Event  abgefeuert wird. Ab diesem Zeitpunkt können Content Skripts mit dem DOM interagieren, aber extern referenzierte Stylesheets und Bilder könnten noch nicht geladen sein.
  • -
  • "end": Läd das Skript nachdem der komplette Inhalt (DOM, JS, CSS, images) der Seute geladen wurde. Zu diesem Zeitpunkt wird das window.onload event abgefeuert.
  • -
- -

Der Standardwert ist "end".

- -

Die Funktion tab.attach() akzepiert contentScriptWhen nicht, da es generell aufgerufen wird wenn die Seite geladen wurde.

- -

Übergabe von Konfigurationsoptionen

- -

Das contentScriptOptions Objekt ist ein JSON Objekt, das den Content Skripts als "read-only" Wert als self.options Eigenschaft übergeben wird:

- -
// main.js
-
-var tabs = require("sdk/tabs");
-
-tabs.on('ready', function(tab) {
-  tab.attach({
-      contentScript: 'window.alert(self.options.message);',
-      contentScriptOptions: {"message" : "hello world"}
-  });
-});
- -

Jeder Wert (Objekt, Feld, String, etc), dass in JSON dargestellt werden kann, kann hier benutzt werden.

- -

Zugriff auf den DOM

- -

Content Skripts können natürlich wie jedes andere Skript, dass die Seite geladen hat ( Page Skripts) auf den DOM zugreifen. Content Skripts und Page Skripts sind wie folgt von einander isoliert:

- -
    -
  • Content Skripts sehen keine JavaScript Objekte, die der Seite über Page Skripts hinzugefügt wurden.
  • -
  • Auch wenn ein Page Skript das Verhalten eines DOM Objekts verändert hat, sieht das Content Skript nur das Originalverhalten.
  • -
- -

Das gleiche gilt auch umgekehrt: Page Skripts sehen keine JavaScript Objekte, die von Content Skripts hinzugefügt wurden.

- -

Stellen Sie sich eine Seite vor, die zum Beispiel eine Variable foo über ein Page Skript zum window Objekt hinzufügt:

- -
<!DOCTYPE html">
-<html>
-  <head>
-    <script>
-    window.foo = "hello from page script"
-    </script>
-  </head>
-</html>
- -

Ein anderes Skript, dass nach diesem Skript in die Seite geladen wird, kann auf foo zugreifen. Ein Content Skript kann dies nicht:

- -
// main.js
-
-var tabs = require("sdk/tabs");
-var mod = require("sdk/page-mod");
-var self = require("sdk/self");
-
-var pageUrl = self.data.url("page.html")
-
-var pageMod = mod.PageMod({
-  include: pageUrl,
-  contentScript: "console.log(window.foo);"
-})
-
-tabs.open(pageUrl);
- -
console.log: my-addon: null
-
- -

Es gibt gute Gründe für diese Isolation. Erstens können Content Skripts so keine Objekte an Webseiten übermitteln und somit Sicherheitslücken schaffen. Zweitens können Content Skripts so Objekte erzeugen, ohne sich Sorgen machen zu müssen, dass diese mit Objekten kollidieren, die in Page Skripts erzeugt wurden.

- -

Die Isulation bedeutet, dass wenn zum Beispiel eine Webseite die JQuery Bibliothek läd, das Content Skript nicht in der Lage ist dieses zu sehen, aber eine eigene JQuery Bibliothek laden kann ohne das es ein Problem mit der Version gibt, die über das Page Skript hinzugefügt wurde.

- -

Interaktion mit Page Skripts

- -

Normalerweise möchte man Content Skripts und Page Skripts voneinander isolieren. Wenn dies nicht der Fall ist, da Sie zum Beispiel Objekte zwischen beiden Skripten austauschen wollen, oder Nachrichten zwischen ihnen schicken wollen können Sie mehr zum Thema unter  Interaktion mit Page Skripts finden.

- -

Event Listeners

- -

Man kann in Content Skripts genau wie in einem Page Skript auf DOM Events warten. Es gibt nur zwei wichtige Unterschieden:

- -

Erstens: Falls Sie einen Event Listener als String an setAttribute() übergeben, wird der Listener im Seitenkontext ausgeführt und hat somit keinen Zugriff auf Variablen, die im Content Skript definiert wurden.

- -

Zum Beispiel, wird dieses Content Skript mit der Fehlermeldung "theMessage is not defined" ausgeben:

- -
var theMessage = "Hello from content script!";
-anElement.setAttribute("onclick", "alert(theMessage);");
- -

Zweitens: Falls Sie einen Event Listener per direkter Zuweisung einem globalen Event Handler  wie onclick zuweisen, könnten Zuweisungen, die die Seite vornimmt überschrieben werden. Zur Veranschaulichung ist hier ein Add-on, das versucht einen click Handler per Zuweisung an window.onclick anzufügen:

- -
var myScript = "window.onclick = function() {" +
-               "  console.log('unsafewindow.onclick: ' + window.document.title);" +
-               "}";
-
-require("sdk/page-mod").PageMod({
-  include: "*",
-  contentScript: myScript,
-  contentScriptWhen: "start"
-});
- -

Das wird auf den meisten Seiten funktionieren, bis auf denen, die ebenfalls ein onclick zuweisen:

- -
<html>
-  <head>
-  </head>
-  <body>
-    <script>
-    window.onclick = function() {
-      window.alert("it's my click now!");
-    }
-    </script>
-  </body>
-</html>
- -

Aus diesen Gründen ist es besser Event Listeners per addEventListener() hinzuzufügen. So definieren Sie einen Listener als Funktion:

- -
var theMessage = "Hello from content script!";
-
-anElement.onclick = function() {
-  alert(theMessage);
-};
-
-anotherElement.addEventListener("click", function() {
-  alert(theMessage);
-});
- -

Kommunikation mit dem Add-on

- -

Damit Add-On Sktipts und Content Skripts miteinander kommunizieren können, haben beide Seiten der Konversation Zugriff auf ein port Objekt.

- -
    -
  • Um eine Nachricht von einer Seite zur anderen zu schicken nutzen Sie port.emit()
  • -
  • Um eine Nachricht von der anderen Seite zu empfangen nutzen port.on()
  • -
- -

Nachrichten sind asyncron, was bedeutet, dass der Sender nicht wartet, bis er eine Antwort des Empfängers erhält, sondern die Nachricht schickt und das weiter arbeitet.

- -

Hier ist ein simples Beispieladd-on, das eine Nachricht an ein Content Skript per port schickt:

- -
// main.js
-
-var tabs = require("sdk/tabs");
-var self = require("sdk/self");
-
-tabs.on("ready", function(tab) {
-  worker = tab.attach({
-    contentScriptFile: self.data.url("content-script.js")
-  });
-  worker.port.emit("alert", "Message from the add-on");
-});
-
-tabs.open("http://www.mozilla.org");
- -
// content-script.js
-
-self.port.on("alert", function(message) {
-  window.alert(message);
-});
- -
-

Das context-menu Modul benutzt das Kommunikationsmodul, das hier beschrieben wird nicht. Um etwas über die Kommunikation mit geladenen Content Skripts im context-menu zu erfahren, schauen Sie in die context-menu Dokumentation.

-
- -

Zugriff auf port im Content Skript

- -

Im Content Skript ist das port Objekt als Eigenschaft im globalen Objekt self verfügbar. So versenden Sie eine Nachricht vom Content Skript:

- -
self.port.emit("myContentScriptMessage", myContentScriptMessagePayload);
- -

Um eine Nachricht vom Add-on Code zu bekommen:

- -
self.port.on("myAddonMessage", function(myAddonMessagePayload) {
-  // Handle the message
-});
- -
-

Das globale self Objekt ist etwas komplett anderes als das self Modul, das einer API in einem Add-on die Möglichkeit bietet auf Daten und die ID des Add-ons zuzugreifen.

-
- -

Zugriff auf port im Add-on Skript

- -

Im Add-on Code ist das Bindeglied zur Kommunikation zwischen Add-on und einem spezifischen Content Skript das  worker Objekt. Das port Objekt ist also eine Eigenschaft des  worker Objekts.

- -

Der worker wird aber im Add-on Code nicht von allen Modulen gleich verwendet.

- -

Vom page-worker

- -

Das page-worker Objekt integriert die worker API direkt. Um also eine Nachricht von einem Content Skript zu erhalten, das mit dem page-worker assoziiert wird benutzt man pageWorker.port.on():

- -
// main.js
-
-var pageWorkers = require("sdk/page-worker");
-var self = require("sdk/self");
-
-var pageWorker = require("sdk/page-worker").Page({
-  contentScriptFile: self.data.url("content-script.js"),
-  contentURL: "http://en.wikipedia.org/wiki/Internet"
-});
-
-pageWorker.port.on("first-para", function(firstPara) {
-  console.log(firstPara);
-});
- -

Um eine benutzerdefinierte Nachricht vom Add-on zu schicken, nutz man pageWorker.port.emit():

- -
// main.js
-
-var pageWorkers = require("sdk/page-worker");
-var self = require("sdk/self");
-
-pageWorker = require("sdk/page-worker").Page({
-  contentScriptFile: self.data.url("content-script.js"),
-  contentURL: "http://en.wikipedia.org/wiki/Internet"
-});
-
-pageWorker.port.on("first-para", function(firstPara) {
-  console.log(firstPara);
-});
-
-pageWorker.port.emit("get-first-para");
- -
// content-script.js
-
-self.port.on("get-first-para", getFirstPara);
-
-function getFirstPara() {
-  var paras = document.getElementsByTagName("p");
-  if (paras.length > 0) {
-    var firstPara = paras[0].textContent;
-    self.port.emit("first-para", firstPara);
-  }
-}
- -

Vom page-mod

- -

Ein einziges  page-mod Objekt kann ein Skript an mehrere Seiten anhängen. Jede dieser Seiten hat ihren eigenen Context, in dem sie dieses Skript aufrufen. Daher benötigt es seperate Kanäle(worker) für jede Seite.

- -

page-mod integriert also die worker API nicht direkt, sondern es wird jedes Mal wenn ein Content Skript an eine Seite angehängt wird das attach Event aufgerufen,  dessen listener einen worker für den Kontext übergeben bekommt. Durch das bereit stellen eines listeners bei attach kann man das port Objekt für das Content Skript, dass dieser Seite angefügt wurde über diesen page-mod verwenden:

- -
// main.js
-
-var pageMods = require("sdk/page-mod");
-var self = require("sdk/self");
-
-var pageMod = pageMods.PageMod({
-  include: ['*'],
-  contentScriptFile: self.data.url("content-script.js"),
-  onAttach: startListening
-});
-
-function startListening(worker) {
-  worker.port.on('click', function(html) {
-    worker.port.emit('warning', 'Do not click this again');
-  });
-}
- -
// content-script.js
-
-window.addEventListener('click', function(event) {
-  self.port.emit('click', event.target.toString());
-  event.stopPropagation();
-  event.preventDefault();
-}, false);
-
-self.port.on('warning', function(message) {
-  window.alert(message);
-});
-
- -

Im oben gezeigten Add-on gibt es zwei Nachrichten:

- -
    -
  • click wird vom page-mod an das Add-on geschickt, wenn der Nutzer auf ein Element auf der Seite klickt
  • -
  • warning schickt einen String zurück an den page-mod
  • -
- -

Von Tab.attach()

- -

Die Tab.attach() methode liefert einen worker zurück, den man zur Kommunikation mit dem/den Content Skript/Content Skripts, die angehängt wurden, verwenden kann.

- -

Das Add-on fügt einen Button zu Firefox hinzu: Wenn der Benutzer den Button drückt, fügt das Add-on ein Content Skript an den aktuellen Tab an. Das Skript sendet eine Nachricht namens "my-addon-message" und wartet auf eine Antwort namens "my-script-response":

- -
//main.js
-
-var tabs = require("sdk/tabs");
-var buttons = require("sdk/ui/button/action");
-var self = require("sdk/self");
-
-buttons.ActionButton({
-  id: "attach-script",
-  label: "Attach the script",
-  icon: "./icon-16.png",
-  onClick: attachScript
-});
-
-function attachScript() {
-  var worker = tabs.activeTab.attach({
-    contentScriptFile: self.data.url("content-script.js")
-  });
-  worker.port.on("my-script-response", function(response) {
-    console.log(response);
-  });
-  worker.port.emit("my-addon-message", "Message from the add-on");
-}
-
- -
// content-script.js
-
-self.port.on("my-addon-message", handleMessage);
-
-function handleMessage(message) {
-  alert(message);
-  self.port.emit("my-script-response", "Response from content script");
-}
- -

Die port API

- -

Schaue unter der Referenzseite für das port Objekt.

-
- -

Die postMessage API

- -

bevor das port Objekt hinzugefügt wurde, kommunizierten Add-on Code und Content Skripts über eine andere API:

- - - -

Die API ist immer noch verfügbar und dokumentiert, aber es gibt keinen Grund sie statt der port API zu verwenden, die hier beschrieben wird. Die Ausnahme bildet das context-menu Modul, welches immer noch postMessage verwendet.

- -

Content Skript zu Content Skript

- -

Content Skripts können nur direkt miteinander kommunizieren, wenn diese im gleichen Kontext geladen wurden. Beispiel: Wenn ein einziger Aufruf von  Tab.attach()  zwei Content Skripts anhängt, können diese sich gegenseitig sehen. Wenn aber Tab.attach() zweimal aufgerufen wird, und die Content Skripts einzeln anhängt,können die Content Skripte nicht miteinander kommunizieren. Dann müssen die Nachrichten über die  port API über den Add-on code gesendet werden.

- -

Cross-domain Content Skripts

- -

Grundsätzlich hat ein Content Skript keine cross-domain Privilegien. Sie können also keinen Inhalt eines iframes auslesen, wenn dieser Inhalt von einer anderen Domain stammt, oder XMLHttpRequests an eine andere Domain schicken.

- -

Um dieses Feature für spezielle Domains hinzuzufügen fügen Sie dem package.json ihres Add-ons den Schlüssel "cross-domain-content" unter dem "permissions" Schlüssel hinzu. Siehe dafür den Artikel  cross-domain content scripts.

-
diff --git a/files/de/mozilla/add-ons/sdk/guides/index.html b/files/de/mozilla/add-ons/sdk/guides/index.html deleted file mode 100644 index fbb8311866..0000000000 --- a/files/de/mozilla/add-ons/sdk/guides/index.html +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: Leitfäden -slug: Mozilla/Add-ons/SDK/Guides -translation_of: Archive/Add-ons/Add-on_SDK/Guides ---- -

Auf dieser Seite sind theoretische und detailliertere Artikel über das SDK auffindbar.

-
-

Für Mitwirkende

-
-
-
-
- Erste Schritte
-
- Erfahre, wie du zu dem SDK beitragen kannst: den Quellcode erhalten, Bugs melden und beheben, Patches einreichen, Überprüfungen und Hilfe erhalten.
-
- Module
-
- Erfahre mehr über das vom SDK verwendete Modulsystem (basierend auf der CommonJS-Spezifikation), wie Sandboxes und Compartments zum Erhöhen der Sicherheit verwendet werden können, und über den im SDK enthaltenen Modul-Loader Cuddlefish.
-
- Klassen und Vererbung
-
- Erfahre, wie Klassen und Vererbungen in JavaScript implementiert werden können, unter Verwendung von Konstruktoren und Prototypen, und über die Helper-Funktion des SDKs zum Vereinfachen dieser Prozesse.
-
-
-
-
-
- Private Eigenschaften
-
- Erfahre, wie private Eigenschaften in JavaScript unter Verwendung von Prefixes, Closures und WeakMaps implementiert werden können und wie das SDK private Eigenschaften durch das Verwenden von Namespaces (eine Verallgemeinerung von WeakMaps) unterstützt.
-
- Prozesse
-
- Das SDK wurde dafür entwickelt, in einer Umgebung zu arbeiten, in welcher Code zum Manipulieren von Web-Inhalten in unterschiedlichen Prozessen wie der Haupt-Code des Add-ons ausgeführt wird. Dieser Artikel erklärt die wichtigsten Vorteile dieses Konzepts.
-
-
-
-
-

SDK-Infrastruktur

-
-
-
-
- Modulstruktur des SDKs
-
- Das SDK selbst sowie die dafür konzipierten Add-ons bestehen aus wiederverwendbaren JavaScript-Modulen. Dieser Artikel erklärt, worum es sich bei diesen Modulen handelt, wie sie geladen werden können und wie die Modul-Baumstruktur des SDKs aufgebaut ist.
-
- SDK-API-Lebenszyklus
-
-  Einführung in den Lebenszyklus der SDK-APIs, beinhaltet Stabilitätsbewertungen für APIs.
-
-
-
-
-
- Programm-ID
-
- Die Programm-ID ist ein eindeutiger Bezeichner für ein Add-on. Dieser Leitfaden zeigt, wie sie erstellt wird, und wozu sie dient.
-
- Firefox-Kompatibilität
-
- Lerne, mit welchen Firefox-versionen eine SDK-Version kompatibel ist und wie Kompatibilitätsprobleme behandelt werden können.
-
-
-
-
-

SDK-Spracheigenschaften

-
-
-
-
- Arbeiten mit Events
-
- Erstelle Event-basierten Code mit Hilfe des SDK-Eventausgabe-Frameworks.
-
-
-
-
-
- Zwei Arten von Scripts
-
- Dieser Artikel erklärt die Unterschiede zwischen den vom Haupt-Code des Add-ons verwendbaren APIs und von denen, die von einem Content-Script verwendet werden können.
-
-
-
-
-

Content-Scripts

-
-
-
-
- Einführung in Content-Scripts
-
- Eine Übersicht über Content-Scripts.
-
- Laden von Content-Scripts
-
- Laden von Content-Scripts in Webseiten, Einbindung entweder von Strings oder von eigenen Dateien und Festlegen des Ausführungszeitpunktes.
-
- Auf das DOM zugreifen
-
- Informationen über den Zugriff von Content-Scripts auf das DOM (Document Object Model).
-
- Kommunikation mit anderen Scripts
-
- Erfahre, wie ein Content-Script mit der main.js-Datei, mit anderen Content-Scripts und von der Webseite selbst geladenen Scripts kommunizieren kann.
-
-
-
-
-
- Verwendung von "port"
-
- Kommunikation zwischen einem Content-Script und den anderen Bestandteilen des Add-ons über das port-Objekt.
-
- Verwendung von "postMessage()"
-
- Kommunikation zwischen einem Content-Script und den anderen Bestandteilen des Add-ons über die postMessage()-API und ein Vergleich dieser Technik mit dem port-Objekt.
-
- Domainübergreifende Content-Scripts
-
- Lerne, wie man Content-Scripts dazu befähigt, mit Inhalten von anderen Domains zu interagieren.
-
- Reddit-Beispiel
-
- Ein einfaches Add-on mit Content-Scripts.
-
-
-
-
-

XUL-Portierung

-
-
-
-
- XUL Portierungsleitfaden
-
- Techniken zum Portieren eines XUL Add-ons auf das SDK.
-
- XUL versus SDK
-
- Ein Vergleich der Stärken und Schwächen des SDK's mit denen der traditionellen XUL-basierten Add-ons.
-
-
-
-
-
- Portierungs-Beispiel
-
- Ein Walkthrough durch das Portieren eines relativ einfachen XUL-basierten Add-ons auf das SDK.
-
-
-
diff --git a/files/de/mozilla/add-ons/sdk/index.html b/files/de/mozilla/add-ons/sdk/index.html deleted file mode 100644 index 4a73b5fbeb..0000000000 --- a/files/de/mozilla/add-ons/sdk/index.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Add-on SDK -slug: Mozilla/Add-ons/SDK -translation_of: Archive/Add-ons/Add-on_SDK ---- -

Das Add-on SDK ermöglicht es, Add-ons für Firefox unter Verwendung der Standard-Webtechnologien zu entwickeln: JavaScript, HTML und CSS. Das SDK beinhaltet JavaScript APIs zum Erstellen, Ausführen, Testen und Packen von Add-ons.

- -
-

Tutorials

- -
- - -
-
-
Benutzeroberflächen
-
Erstelle Benutzeroberflächenkomponenten wie Toolbar-Buttons, Kontextmenüs, Menüeinträge oder Dialoge.
-
Inhalte von Webseiten bearbeiten
-
Inhalte von Seiten über ein spezifisches URL-Muster oder dynamisch einen bestimmten Tab bearbeiten.
-
Zusammenfassung
-
Walk-through durch das Beispiel-Add-on "Annotator".
-
-
-
- -
-

Leitfäden

- -
-
-
-
Zum SDK beitragen
-
Trage zum SDK bei und lerne die wichtigsten im SDK-Quelltext verwendeten Objekte wie Module, Klassen und Vererbung, private Eigenschaften und Inhaltsabläufe kennen.
-
SDK-Aufbau
-
Verstehe die Technologien, die dem SDK zugrunde liegen: Modulstruktur, Programm-ID und die Regeln, die die Firefox-Kompatibilität definieren.
-
Content-Scripts
-
Eine detaillierte Anleitung zum Arbeiten mit Content-Scripts. Erklärt wird das Laden von Content-Scripts, auf welche Objekte ein Content-Script zugreifen kann und wie man zwischen einem Content-Script und dem Rest des Add-ons kommunizieren kann.
-
-
- - -
- -
-

Referenzen

- -
-
-
-
High-Level-APIs
-
Dokumentation der High-Level-SDK-APIs.
-
Tools-Referenz
-
Dokumentation des cfx-Tools zum Entwickeln, Testen und Packen von Add-ons, der Konsole, die global zum Loggen verwendet wird und der package.json-Datei.
-
-
- -
-
-
Low-Level-APIs
-
Dokumentation der Low-Level-SDK-APIs.
-
-
-
- -

 

diff --git a/files/de/mozilla/add-ons/sdk/tools/index.html b/files/de/mozilla/add-ons/sdk/tools/index.html deleted file mode 100644 index 8c67b4644e..0000000000 --- a/files/de/mozilla/add-ons/sdk/tools/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Tools -slug: Mozilla/Add-ons/SDK/Tools -tags: - - Add-on SDK - - CFX - - JPM - - NeedsTranslation - - TopicStub -translation_of: Archive/Add-ons/Add-on_SDK/Tools ---- -

Articles listed here provide a reference for the SDK's tools:

- -

{{ LandingPageListSubpages ("/en-US/Add-ons/SDK/Tools", 7) }}

diff --git a/files/de/mozilla/add-ons/sdk/tools/jpm/index.html b/files/de/mozilla/add-ons/sdk/tools/jpm/index.html deleted file mode 100644 index 86e6a82aa3..0000000000 --- a/files/de/mozilla/add-ons/sdk/tools/jpm/index.html +++ /dev/null @@ -1,497 +0,0 @@ ---- -title: jpm -slug: Mozilla/Add-ons/SDK/Tools/jpm -translation_of: Archive/Add-ons/Add-on_SDK/Tools/jpm ---- -
-

Sie können jpm ab Firefox 38 verwenden.

- -

Dieser Artikel bezieht sich auf jpm.

-
- -

Der Node-basierte Ersatz für cfx, erlaubt das Testen, Starten und Paketieren von Add-Ons.

- -

Schauen Sie sich das jpm-Tutorial als Einführung an.

- -

jpm wird folgendermaßen verwendet:

- -
jpm [command] [options]
-
- -

jpm unterstützt die folgenden globalen Optionen:

- -
-h, --help        - Zeigt eine Hilfsnachricht
--V, --version     - Anzeigen der JPM Versionsnummer
-
- -

Installation

- -

jpm wird über den Node Package Manager (npm) installiert. npm ist im Installer von Node.js enthalten, welchen Sie auf nodejs.org finden.

- -

Nachdem Sie npm installiert haben, können Sie jpm wie jedes andere npm-Paket installieren:

- -
npm install jpm -g
- -

Abhängig von ihren Einstellungen müssen Sie den Befehl möglicherweise mit Adminrechten ausführen:

- -
sudo npm install jpm -g
- -

Tippen Sie folgendes in die Eingabeaufforderung:

- -
jpm
- -

Es sollte sich eine Zusammenfassung der jpm-Kommandos öffnen. Im Gegensatz zu cfx ist jpm in jeder Eingabeaufforderung verwendbar, solange Sie es mit der Option -g installiert haben.

- -

Probleme?

- -

Falls Sie die Zusammenfassung nicht verstehen, fragen Sie nach Hilfe. SDK-Nutzer und Teammitglieder des Projekts diskutieren über Probleme und Vorschläge in der  Projekt- Mailingliste. Andere könnten das selbe Problem wie Sie gehabt haben, also suchen Sie bitte zuerst im Listenarchiv. Sie können mit anderen SDK-Nutzern im Kanal #jetpack in Mozillas IRC-Netzwerk chatten.

- -

Command reference

- -

There are six jpm commands:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
jpm initCreate a skeleton add-on as a starting point for your own add-on.
jpm runLaunch an instance of Firefox with your add-on installed.
jpm testRuns your add-on's unit tests.
jpm xpiPackage your add-on as an XPI file, which is the install file format for Firefox add-ons.
jpm postPackage your add-on as an XPI file, then post it to some url.
jpm watchpostPackage your add-on as an XPI file whenever there is a file changed, and post that to some url.
- -

jpm init

- -

This command initializes a new add-on from scratch.

- -

Create a new directory, change into it, and run jpm init.

- -
mkdir my-addon
-cd my-addon
-jpm init
- -

You'll then be asked to supply some information about your add-on: this will be used to create your add-on's package.json file.

- - - -

Most of these fields have a default, which is shown in brackets after the question. If you just press Enter, your add-on will get the default value.

- -

Once you've supplied a value or accepted the default for these properties, you'll be shown the complete contents of "package.json" and asked to accept it.

- -

Then jpm will create an skeleton add-on, as a starting point for your own add-on development, with the following file structure:

- - - -

jpm run

- -

This command runs a new instance of Firefox with the add-on installed:

- -
jpm run
- -

jpm run accepts the following options:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-b --binary BINARY -

Use the version of Firefox specified in BINARY. BINARY may be specified as a full path or as a path relative to the current directory.

- -
-jpm run -b /path/to/Firefox/Nightly
- See Selecting a browser version.
--binary-args CMDARGS -

Pass extra arguments to Firefox.

- -

For example, to pass the -jsconsole argument to Firefox, which will launch the Browser Console, try the following:

- -
-jpm run --binary-args -jsconsole
- -

To pass multiple arguments, or arguments containing spaces, quote them:

- -
-jpm run --binary-args '-url mzl.la -jsconsole'
-
--debugRun the add-on debugger attached to the add-on.
-o --overload PATH -

Rather than use the SDK modules built into Firefox, use the modules found at PATH. If -o is specified and PATH is omitted, jpm will look for the JETPACK_ROOT environment variable and use its value as the path.

- -

See Overloading the built-in modules for more information.

-
-p --profile= PROFILE -

By default, jpm uses a clean temporary Firefox profile each time you call jpm run. Use the --profile option to instruct jpm to launch Firefox with an existing profile.

- -

The PROFILE value may be a profile name or the path to the profile.

- -

See Using profiles for more information.

-
-v --verboseVerbose operation.
--no-copy -
Use with caution because jpm run|test changes many preferences, never use with your main profile.
- -
This only applies when --profile is used.
- Disables the copying of the profile used, which allows one to reuse a profile.
 
- -

jpm test

- -

Use this command to run an add-on's unit tests. It will:

- - - -
jpm test
-
- -

See the tutorial on unit testing and the reference documentation for the assert module for more details on this.

- -

jpm test accepts the following options:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-b --binary BINARY -

Use the version of Firefox specified in BINARY. BINARY may be specified as a full path or as a path relative to the current directory.

- -
-jpm test -b /path/to/Firefox/Nightly
- -

See Selecting a browser version.

-
--binary-args CMDARGS -

Pass extra arguments to Firefox.

- -

For example, to pass the -jsconsole argument to Firefox, which will launch the Browser Console, try the following:

- -
-jpm test --binary-args -jsconsole
- -

To pass multiple arguments, or arguments containing spaces, quote them:

- -
-jpm test --binary-args '-url mzl.la -jsconsole'
-
--debugRun the add-on debugger attached to the add-on.
-f --filter FILE[:TEST] -

Only run tests whose filenames match FILE and optionally match TEST, both regexps.

- -
-jpm test --filter base64:btoa
- -

The above command only runs tests in files whose names contain "base64", and in those files only runs tests whose names contain "btoa".

-
-o --overload PATH -

Rather than use the SDK modules built into Firefox, use the modules found at PATH. If -o is specified and PATH is omitted, jpm will look for the JETPACK_ROOT environment variable and use its value as the path.

- -

See Overloading the built-in modules for more information.

-
-p --profile PROFILE -

By default, jpm uses a clean temporary Firefox profile each time you call jpm run. Use the --profile option to instruct jpm to launch Firefox with an existing profile.

- -

The PROFILE value may be a profile name or the path to the profile.

- -

See Using profiles for more information.

-
--stop-on-error -

By default jpm test keeps running tests even after tests fail. Specify --stop-on-error to stop running tests after the first failure:

- -
-jpm test --stop-on-error
-
--tbplPrint test output in Treeherder format
--times NUMBER -

Run tests NUMBER of times:

- -
-jpm test --times 2
-
-v --verboseVerbose operation.
--no-copy -
Use with caution because jpm run|test changes many preferences, never use with your main profile.
- -
This only applies when --profile is used.
- Disables the copying of the profile used, which allows one to reuse a profile.
- -

jpm xpi

- -

This command packages the add-on as an XPI file, which is the install file format for Mozilla add-ons.

- -
jpm xpi
- -

It looks for a file called package.json in the current directory and creates the corresponding XPI file. It ignores any ZIPs or XPIs in the add-on's root, and any test files.

- -

Once you have built an XPI file you can distribute your add-on by submitting it to addons.mozilla.org.

- -

jpm xpi accepts the following option:

- - - - - - - - -
-v --verbose -

Verbose operation:

- -
-jpm xpi -v
-
- -

jpm post

- -

This command packages the add-on as an XPI file, the posts it to some url.

- -
jpm post
- -

It looks for a file called package.json in the current directory and creates a XPI file with which to post to the --post-url.

- -

jpm post accepts the following options:

- - - - - - - - - - - - -
--post-url URL -

The url to post the extension to after creating a XPI.

- -
-jpm post --post-url http://localhost:8888/
- -

See Using Post and Watchpost for more information.

-
-v --verbose -

Verbose operation:

- -
-jpm post --post-url http://localhost:8888/ -v
-
- -

jpm watchpost

- -

This command packages the add-on as an XPI file, the posts it to some url whenever a file in the current working directory changes.

- -
jpm watchpost
- -

Creates a XPI whenever a file in the current working directory changes and posts that to the --post-url.

- -

jpm watchpost accepts the following options:

- - - - - - - - - - - - -
--post-url URL -

The url to post the extension to after creating a XPI.

- -
-jpm watchpost --post-url http://localhost:8888/
- -

See Using Post and Watchpost for more information.

-
-v --verbose -

Verbose operation:

- -
-jpm watchpost --post-url http://localhost:8888/ -v
-
- -

Techniques

- -

Selecting a browser version

- -

By default, jpm run and jpm test will run the release version of Firefox. You can instruct jpm to use a different version in one of two ways:

- - - -

Using .jpmignore to ignore files

- -

Using .jpmignore is similar to using .gitignore with git, .hgignore with Mercurial, or .npmignore with npm. By using this file you can let jpm know which files you would like it to ignore when building a .xpi file with jpm xpi.

- -

Here is an example:

- -
# Ignore .DS_Store files created by mac
-.DS_Store
-
-# Ignore any zip or xpi files
-*.zip
-*.xpi
-
- -

A .jpmignore file with the above contents would ignore all zip files and .DS_Store files from the xpi generated by jpm xpi.

- -

Using profiles

- -

By default, jpm run uses a new profile each time it is executed. This means that any profile-specific data entered from one run of jpm will not, by default, be available in the next run.

- -

This includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage API.

- -

To make jpm use a specific profile, pass the --profile option, specifying the name of the profile you wish to use, or the path to the profile.

- -
jpm run --profile boogaloo
-
- -
jpm run --profile path/to/boogaloo
- -

If you supply --profile but its argument is not the name of or path to an existing profile, jpm will open the profile manager,  enabling you to select and existing profile or create a new one:

- -
jpm run --profile i-dont-exist
- -

Developing without browser restarts

- -

Because jpm run restarts the browser each time you invoke it, it can be a little cumbersome if you are making very frequent changes to an add-on. An alternative development model is to use the Extension Auto-Installer add-on: this listens for new XPI files on a specified port and installs them automatically. That way you can test new changes without needing to restart the browser:

- - - -

You could even automate this workflow with a simple script. For example:

- -
jpm watchpost --post-url http://localhost:8888/
-
- -

Note that the logging level defined for the console is different when you use this method, compared to the logging level used when an add-on is run using jpm run. This means that if you want to see output from console.log() messages, you'll have to tweak a setting. See the documentation on logging levels for the details on this.

- -

Overloading the built-in modules

- -

The SDK modules you use to implement your add-on are built into Firefox. When you run or package an add-on using jpm run or jpm xpi, the add-on will use the versions of the modules in the version of Firefox that hosts it.

- -

As an add-on developer, this is usually what you want. But if you're developing the SDK modules themselves, of course, it isn't. In this case you need to:

- - - -
jpm run -o
-
- -

This instructs jpm to use the local copies of the SDK modules, not the ones in Firefox. If you don't want to set the JETPACK_ROOT environment variable, you can pass the location of your copy of the SDK modules along with -o:

- -
jpm run -o "/path/to/SDK/"
diff --git a/files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html b/files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html deleted file mode 100644 index c5f41a2baf..0000000000 --- a/files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Einen Button zur Toolbar hinzufügen -slug: Mozilla/Add-ons/SDK/Tutorials/Adding_a_Button_to_the_Toolbar -translation_of: Archive/Add-ons/Add-on_SDK/Tutorials/Adding_a_Button_to_the_Toolbar ---- -
- Für dieses Tutorial wird die erfolgreiche Installation des SDK und erlernte Vorkenntnisse von cfx vorrausgesetzt.
-
-

Dieses Widget wird ab Firefox 29 nicht mehr verwendet/funktionieren. Um Buttons in Firefox 29 (+) hinzuzufügen, benutze bitte die UI Module, besonders die Action-Buttons oder Toogle-Buttons APIs.

-
-

Um einen Button zur Toolbar hinzuzufügen, verwende das widget-Module.

-

Erstelle ein neues Verzeichnis, navigiere mit der Eingabeaufforderung in dieses Verzeichnis, und gib cfx init ein. Dann öffne die Datei "main.js" im "lib"-Verzeichnis und gib folgenden Code ein:

-
var widgets = require("sdk/widget");
-var tabs = require("sdk/tabs");
-
-var widget = widgets.Widget({
-  id: "mozilla-link",
-  label: "Mozilla website",
-  contentURL: "http://www.mozilla.org/favicon.ico",
-  onClick: function() {
-    tabs.open("http://www.mozilla.org/");
-  }
-});
-

Das Widget wird wird zur AddOn-Leiste (unten am Fensterrand) hinzugefügt:

-

Du kannst leider nicht die Standart-Position des Icons ändern, aber der User kann den Standort jederzeit verändern. Das id-Attribut ist zwingend erforderlich. Es speichert die Position des Icons und sollte nicht verändert weren, da sonst wieder der Standart wiederhergestellt wird.

-

Beim Aktivieren wird dieser Link geöffnet: http://www.mozilla.org.

-
-  
-

Das Icon angeben (URL)

-

Wenn Du dieses Widget verwendest, kannst Du das Icon via contentURL: anzeigen. Das kann eine lokale, aber auch eine externe Datei sein. Allerdings lässt es sich nicht empfehlen Icons im Internet zu verwenden, da bei einem Serverausfall die Grafik nicht geladen werden kann. Das Beispiel verwendet eine Grafik namens "my-icon.png" aus dem AddOn-Verzeichnis (data):

-
-
var widgets = require("sdk/widget");
-var tabs = require("sdk/tabs");
-var self = require("sdk/self");
-
-var widget = widgets.Widget({
-  id: "mozilla-link",
-  label: "Mozilla website",
-  contentURL: self.data.url("my-icon.png"),
-  onClick: function() {
-    tabs.open("http://www.mozilla.org/");
-  }
-});
-
-

Du kannst das Icon immer mit contentURL ändern!

-

Responding To the User

-

You can listen for click, mouseover, and mouseout events by passing handler functions as the corresponding constructor options. The widget example above assigns a listener to the click event using the onClick option, and there are similar onMouseover and onMouseout options.

-

To handle user interaction in more detail, you can attach a content script to the widget. Your add-on script and the content script can't directly access each other's variables or call each other's functions, but they can send each other messages.

-

Here's an example. The widget's built-in onClick property does not distinguish between left and right mouse clicks, so to do this we need to use a content script. The script looks like this:

-
window.addEventListener('click', function(event) {
-  if(event.button == 0 && event.shiftKey == false)
-    self.port.emit('left-click');
-  if(event.button == 2 || (event.button == 0 && event.shiftKey == true))
-    self.port.emit('right-click');
-    event.preventDefault();
-}, true);
-

It uses the standard DOM addEventListener() function to listen for click events, and handles them by sending the corresponding message to the main add-on code. Note that the messages "left-click" and "right-click" are not defined in the widget API itself, they're custom events defined by the add-on author.

-

Save this script in your data directory as "click-listener.js".

-

Next, modify main.js to:

- -
var widgets = require("sdk/widget");
-var tabs = require("sdk/tabs");
-var self = require("sdk/self");
-
-var widget = widgets.Widget({
-  id: "mozilla-link",
-  label: "Mozilla website",
-  contentURL: "http://www.mozilla.org/favicon.ico",
-  contentScriptFile: self.data.url("click-listener.js")
-});
-widget.port.on("left-click", function(){
-  console.log("left-click");
-});
-widget.port.on("right-click", function(){
-  console.log("right-click");
-});
-

Now execute cfx run again, and try right- and left-clicking on the button. You should see the corresponding string written to the command shell.

-

Attaching a Panel

- -

-

If you supply a panel object to the widget's constructor, then the panel will be shown when the user clicks the widget:

-
var data = require("sdk/self").data;
-var clockPanel = require("sdk/panel").Panel({
-  width:215,
-  height:160,
-  contentURL: data.url("clock.html")
-});
-require("sdk/widget").Widget({
-  id: "open-clock-btn",
-  label: "Clock",
-  contentURL: data.url("History.png"),
-  panel: clockPanel
-});
-

To learn more about working with panels, see the tutorial on displaying a popup.

-

Learning More

-

To learn more about the widget module, see its API reference documentation.

-

To learn more about content scripts, see the content scripts guide.

diff --git a/files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html b/files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html deleted file mode 100644 index dbafb57553..0000000000 --- a/files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: Getting started -slug: Mozilla/Add-ons/SDK/Tutorials/Getting_started -translation_of: Mozilla/Add-ons/SDK/Tutorials/Getting_Started_%28jpm%29 ---- -

This tutorial walks through creating a simple add-on using the SDK.

- -

Prerequisites

- -

To create add-ons for Firefox using the SDK, you'll first need to follow the instructions to install and activate the SDK. Once you've done that, you'll be looking at a command prompt.

- -

Initializing an empty add-on

- -

In the command prompt, create a new directory. The directory doesn't have to be under the SDK root: you can create it anywhere you like. Navigate to it, type cfx init, and hit enter:

- -
mkdir my-addon
-cd my-addon
-cfx init
-
- -

You'll see some output like this:

- -
* lib directory created
-* data directory created
-* test directory created
-* doc directory created
-* README.md written
-* package.json written
-* test/test-main.js written
-* lib/main.js written
-* doc/main.md written
-Your sample add-on is now ready for testing:
-try "cfx test" and then "cfx run". Have fun!"
-
- -

Implementing the add-on

- -

Now you can write the add-on's code, which goes in the "main.js" file in your "lib" directory. This file was created for you in the previous step. Open it and add the following code:

- -
var buttons = require('sdk/ui/button/action');
-var tabs = require("sdk/tabs");
-
-var button = buttons.ActionButton({
-  id: "mozilla-link",
-  label: "Visit Mozilla",
-  icon: {
-    "16": "./icon-16.png",
-    "32": "./icon-32.png",
-    "64": "./icon-64.png"
-  },
-  onClick: handleClick
-});
-
-function handleClick(state) {
-  tabs.open("https://www.mozilla.org/");
-}
-
- -

Save the file.

- -

Next, save these three icon files to the "data" directory:

- - - - - - - - - - - - - - - - -
icon-16.png
icon-32.png
icon-64.png
- -

Back at the command prompt, type:

- -
cfx run
-
- -

This is the SDK command to run a new instance of Firefox with your add-on installed. When Firefox launches, in the top-right corner of the browser you'll see an icon with the Firefox logo. Click the icon, and a new tab will open with https://www.mozilla.org/ loaded into it.

- -
-

You might see an error message like this when you type cfx run:

- -
A given cfx option has an inappropriate value:
-  ZIP does not support timestamps before 1980
- -

If so, you've run into bug 1005412, meaning that the icon files you downloaded are given a timestamp of 1970. Until this bug is fixed, the workaround is to use the touch command to update the timestamps:

- -
touch icon-16.png
-
- -

That's all this add-on does. It uses two SDK modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab.

- -

Try editing this file. For example, we could change the page that gets loaded:

- -
var buttons = require('sdk/ui/button/action');
-var tabs = require("sdk/tabs");
-
-var button = buttons.ActionButton({
-  id: "mozilla-link",
-  label: "Visit Mozilla",
-  icon: {
-    "16": "./icon-16.png",
-    "32": "./icon-32.png",
-    "64": "./icon-64.png"
-  },
-  onClick: handleClick
-});
-
-function handleClick(state) {
-  tabs.open("https://developer.mozilla.org/");
-}
- -

At the command prompt, execute cfx run again. This time clicking it takes you to https://developer.mozilla.org/.

- -

Packaging the add-on

- -

When you've finished the add-on and are ready to distribute it, you'll need to package it as an XPI file. This is the installable file format for Firefox add-ons. You can distribute XPI files yourself or publish them to https://addons.mozilla.org so other users can download and install them.

- -

To build an XPI, just execute the command cfx xpi from the add-on's directory:

- -
cfx xpi
-
- -

You should see a message like:

- -
Exporting extension to my-addon.xpi.
-
- -

To test that this worked, try installing the XPI file in your own Firefox installation. You can do this by pressing the Ctrl+O key combination (Cmd+O on Mac) from within Firefox, or selecting the "Open" item from Firefox's "File" menu. This will bring up a file selection dialog; navigate to the "my-addon.xpi" file, open it and follow the prompts to install the add-on.

- -

Summary

- -

In this tutorial we've built and packaged an add-on using three commands:

- - - -

These are the three main commands you'll use when developing SDK add-ons. There's comprehensive reference documentation covering all the commands you can use and all the options they take.

- -

The add-on code itself uses two SDK modules, action button and tabs. There's reference documentation for all the high-level and low-level APIs in the SDK.

- -

What's next?

- -

To get a feel for some of the things you can do with the SDK APIs, try working through some of the tutorials.

- -

Advanced techniques

- -

Overriding the built-in modules

- -

The SDK modules you use to implement your add-on are built into Firefox. When you run or package an add-on using cfx run or cfx xpi, the add-on will use the versions of the modules in the version of Firefox that hosts it.

- -

As an add-on developer, this is usually what you want. But if you're developing the SDK modules themselves, of course, it isn't. In this case it's assumed that you have checked out the SDK from its GitHub repo and will have run the bin/activate script from the root of your checkout.

- -

Then when you invoke cfx run or cfx xpi, you pass the "-o" option:

- -
cfx run -o
-
- -

This instructs cfx to use the local copies of the SDK modules, not the ones in Firefox.

- -

Developing without cfx run

- -

Because cfx run restarts the browser each time you invoke it, it can be a little cumbersome if you are making frequent changes to an add-on. An alternative development model is to use the Extension Auto-Installer add-on: this listens for new XPI files on a specified port and installs them automatically. That way you can test new changes without needing to restart the browser:

- - - -

You could even automate this workflow with a simple script. For example:

- -
while true ; do cfx xpi ; wget --post-file=codesy.xpi http://localhost:8888/ ; sleep 5 ; done
-
- -

Note that the logging level defined for the console is different when you use this method, compared to the logging level used when an add-on is run using cfx run. This means that if you want to see output from console.log() messages, you'll have to tweak a setting. See the documentation on logging levels for the details on this.

- -

Another example using grunt and grunt-shell:

- -
module.exports = function(grunt) {
-  'use strict';
-  require('matchdep').filterDev('grunt-!(cli)').forEach(grunt.loadNpmTasks);
-  grunt.initConfig({
-    shell: {
-      xpi: {
-        command: [
-          'cd pluginpath',
-          'cfx xpi',
-          'wget --post-file=pluginname.xpi http://localhost:8888/ || echo>/dev/null'
-        ].join('&&')
-      }
-    },
-    watch: {
-      xpi: {
-        files: ['pluginpath/**'],
-        tasks: ['shell:xpi']
-      }
-    }
-  });
-
-  grunt.loadNpmTasks('grunt-contrib-watch');
-  grunt.loadNpmTasks('grunt-shell');
-  grunt.registerTask('default', ['watch']);
-};
diff --git a/files/de/mozilla/add-ons/sdk/tutorials/index.html b/files/de/mozilla/add-ons/sdk/tutorials/index.html deleted file mode 100644 index 6eb7e95b49..0000000000 --- a/files/de/mozilla/add-ons/sdk/tutorials/index.html +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Tutorials -slug: Mozilla/Add-ons/SDK/Tutorials -translation_of: Archive/Add-ons/Add-on_SDK/Tutorials ---- -

Auf dieser Seite wird gezeigt, wie man spezifische praktische Aufgaben unter Verwendung des SDKs bewältigen kann.

-
-

Erste Schritte

-
-
-
-
- Installation
-
- Download, Installation und Einrichtung des SDKs unter Windows, OS X und Linux.
-
-
-
- Fehlerbehebung
-
- Lösungsansätze zum Beheben klassischer Probleme und Möglichkeiten zum Erhalten weiterer Hilfe.
-
-
-
-
-
- Erste Schritte mit cfx
-
- Die elementaren cfx-Befehle zum Erstellen von Add-ons.
-
-
-
-
-

Benutzeroberflächen erstellen

-
-
-
-
- Toolbar-Button hinzufügen
-
- Einen Button zur Firefox-Toolbar hinzufügen.
-
- Hauptmenü erweitern
-
- Items den Hauptmenüs von Firefox hinzufügen.
-
-
-
-
-
- Popups anzeigen
-
- Einen Popup-Dialog unter Verwendung von HTML und JavaScript anzeigen.
-
- Kontextmenü erweitern
-
- Items dem Kontextmenü von Firefox hinzufügen.
-
-
-
-
-

Interagieren mit dem Browser

-
-
-
-
- Webseiten öffnen
-
- Mit Hilfe des tabs-Moduls eine Seite in einem neuen Tab oder einem neuen Fenster öffnen und auf deren Inhalt zugreifen.
-
- Auf das Laden von Webseiten reagieren
-
- Mit dem tabs-Modul erkennen, wenn neue Webseiten geladen werden und auf deren Inhalte zugreifen.
-
-
-
-
-
- Geöffnete Tabs auflisten
-
- Mit dem tabs-Modul geöffnete Tabs auflisten und auf ihre Inhalte zugreifen.
-
-
-
-
-

Inhalte von Webseiten bearbeiten

-
-
-
-
- Webseiten basierend auf deren URL bearbeiten
-
- URL-Filter für Webseiten erstellen und ein Script darin ausführen, sobald eine Seite geladen wird, deren URL mit einer URL im Filter übereinstimmt.
-
-
-
-
-
- Aktive Webseite bearbeiten
-
- Ein Script dynamisch in der aktuell aktiven Website ausführen.
-
-
-
-
-

Entwicklungstechnologien

-
-
-
-
- Loggen
-
- Nachrichten auf der Konsole für Diagnosezwecke ausgeben.
-
- Wiederverwendbare Module erstellen
-
- Gliedere dein Add-on in einzelne Module und erleichtere somit das Entwickeln, Debuggen und Erhalten des Add-ons. Erstelle wiederverwendbare Pakete, die deine Module enthalten, damit auch andere Add-on-Entwickler diese verwenden können.
-
- Testen der Bestandteile
-
- Erstellen und Ausführen von Tests mit dem SDK-test-Framework.
-
- Chrome-Autorität
-
- Erhalte Zugriff auf das Components-Objekt und erlaube deinem Add-on XPCOM-Objekte zu laden und zu verwenden.
-
- Erstellen von benutzerdefinierten Events
-
- Erlaube deinen erstellten Objekten, eigene Events auszugeben.
-
-
-
-
-
- Auf das Starten und Beenden des Add-ons reagieren
-
- Werde benachrichtigt, wenn ein Add-on von Firefox gestartet oder beendet wird und übergebe Argumente an das Add-on über die Kommandozeile.
-
- Module von Drittanbietern verwenden
-
- Installation und Verwendung von zusätzlichen Modulen, die nicht im SDK enthalten sind.
-
- Lokalisierung
-
- Entwicklung lokalisierbarer Add-ons.
-
- Entwicklung für mobile Endgeräte
-
- Entwicklung von Add-ons für Firefox Mobile für Android.
-
-
-
-
-

Zusammenfassung

-
-
-
-
- Add-on "Annotator"
-
- Walk-through durch das Beispiel-Add-on "Annotator".
-
-
-
-

 

diff --git a/files/de/mozilla/add-ons/sdk/tutorials/installation/index.html b/files/de/mozilla/add-ons/sdk/tutorials/installation/index.html deleted file mode 100644 index 28e899226e..0000000000 --- a/files/de/mozilla/add-ons/sdk/tutorials/installation/index.html +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Installation -slug: Mozilla/Add-ons/SDK/Tutorials/Installation -translation_of: Mozilla/Add-ons/SDK/Tools/jpm#Installation ---- -
-

Die cfx Installation ist veraltet. Sie sollten stattdessen  jpm benutzen.

- -

Mehr Informationen finden Sie unter JPM replaces CFX for Firefox 38.

-
- -

Vorraussetzungen

- -

Um mit dem Add-on SDK zu entwickeln, brauchen Sie:

- - - -

Installation

- -

Installation auf FreeBSD/ OS X / Linux

- -

Entpacken Sie die Dateien an einen beliebigen Ort und navigieren Sie mit einer Kommandozeile/Shell in das Stammverzeichnis der SDK. Zum Beispiel so:

- -
tar -xf addon-sdk.tar.gz
-cd addon-sdk
-
- -

Danach aktivieren Sie so die SDK, wenn Sie ein Bash Benutzer sind (was die meisten sind):

- -
source bin/activate
-
- -

Als nicht-Bash Benutzer, müssen Sie folgenden Befehl verwenden:

- -
bash bin/activate
-
- -

In Ihrer Eingabeaufforderung sollten Sie jetzt einen neuen Prefix haben, der den Namen des SDK's root Verzeichniss hat:

- -
(addon-sdk)~/mozilla/addon-sdk >
-
- -

Installation auf Mac mit Homebrew

- -

Falls Sie ein Mac Benutzer sind, können Sie die SDK auch mithilfe von Homebrew und dem folgenden Befehl installieren:

- -
brew install mozilla-addon-sdk
- -

Sobald die Installation erfolgreich abgeschlossen wurde, können Sie das cfx Programm jederzeit in der Kommandozeile verwenden und benötigen keine vorherige Aktivierung.

- -

Installation auf Windows

- -

Entpacken Sie die Dateien an einen beliebigen Ort und navigieren Sie mit einer Kommandozeile/Shell in das Stammverzeichnis der SDK. Zum Beispiel so:

- -
7z.exe x addon-sdk.zip
-cd addon-sdk
-
- -

Dann führen Sie folgenden Befehl aus:

- -
bin\activate
-
- -

In Ihrer Eingabeaufforderung sollten Sie jetzt einen neuen Prefix haben, der den Namen des SDK's root Verzeichniss hat:

- -
(C:\Users\mozilla\sdk\addon-sdk) C:\Users\Work\sdk\addon-sdk>
-
- -

Plausibilitätsprüfung

- -

Rufen Sie diesen Befehl in einer Kommandozeile auf:

- -
cfx
-
- -

Es sollte eine Meldung produzieren, die in etwa so aussieht, gefolgt von einer Auflistung der Benutzungsoptionen:

- -
Usage: cfx [options] [command]
-
- -

Das ist das cfx Kommandozeilen Programm. Es ist ihr primäres Interface für das Add-on SDK. Damit können Sie Firefox starten und ihr Add-on testen, ihr Add-on zur Veröffentlichung verpacken, sich Dokumentationen ansehen und Unit tests durchführen.

- -

Nächste Schritte

- -

Schauen Sie sich als nächstes das Tutorial  Getting Started With cfx an, das erklärt, wie man ein Add-on mit dem CFX Tool erstellt.

- -

Fortgeschrittene Themen

- -

Das SDK von Git verwenden

- -

Die SDK wurde in GitHub entwickelt. Statt das verpackte Release zu verwenden, können Sie von GitHub repository den letzten Entwicklungsstand, statt dem offiziellen Release verwenden.

- -

Wenn Sie den letzten Entwicklungsstand verwenden, benötigen Sie eine Nightly Version von Firefox und Sie können keine Add-ons bei addons.mozilla.org (AMO) einreichen, da AMP den offiziellen Release vorraussetzt.

- -

Erweiterungen für AMO von Git Quellen entwickeln

- -

Zum Einreichein bei AMO können nur der neuste git release tag für die Add-On SDK Quelldateien benutzt werden.

- -

Der Gitarchivbefehl wird benötigt um ein Paar  Git Atrributplatzhalter im Git Klonverzeichnis zu erweitern.

- -

git checkout 1.16

- -

git archive 1.16 python-lib/cuddlefish/_version.py | tar -xvf -

- -

Permanente Aktivierung

- -

Sie können die Aktivierung permanent machen, in dem Sie die Variablen in ihrer Umgebung permanent setzen, so dass jede Eingabeaufforderung sie lesen kann. In diesem Fall müssen nicht jedesmal den activate Befehl verwenden, sobald Sie eine neue Eingabeaufforderung öffnen.

- -

Da sich die Anzahl der zu setzenden Variable mit jeder neuen Version des SDK ändern kann, ist es am Besten sich nach den jeweiligen Aktivierungsskripten zu richten um Festzustellen welche Variablen verwendet werden. Die Aktivierung benutzt verschieden Skripte für Bashumgebungen (Linux und OS X) und Windowsumgebungen.

- -

Windows

- -

Bei Windows, benutzt bin\activate die activate.bat Datei. Sie können die Aktivierung permanent machen, indem Sie in der Kommandozeile das setx tool verwenden.

- -

Linux / OS X

- -

Auf Linux und OS X benutz source bin/activate das activate bash Skript. Die Aktivierung kann per ~/.bashrc (Linux) oder ~/.bashprofile (OS X) Permanent gemacht werden.

- -

Eine Alternative ist das Erstellen eines symbolischen Links im Ordner ~/bin, der auf das cfx Programm verweist:

- -
ln -s PATH_TO_SDK/bin/cfx ~/bin/cfx
-
- -

Falls Sie Homebrew zur Installation des SDKs verwenden, werden die Umgebungsvariablen bereits permanent für Sie gesetzt.

- -

activate

- -

Der activate Befehl setzt Umgebungsvariablen, die zur Nutzung der SDK nötig sind. Er setzt die Variablen nur für die aktuelle Kommandozeile. Das heisst, wenn Sie eine neue Kommandozeile öffnen, müssen Sie den Befehl erneut ausführen, bevor Sie die SDK wieder benutzen können.

- -

Das bedeutet, dass Sie mehrere Kopien der SDK an verschiedenen Orten ihrer Festplatte haben können und zwischen diesen wechseln können, oder sogar gleichzeitig in verschiedenen Eingabeaufforderungen aktiviert haben können.

diff --git a/files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html b/files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html deleted file mode 100644 index 9d33162519..0000000000 --- a/files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html +++ /dev/null @@ -1,476 +0,0 @@ ---- -title: Developing for Firefox Mobile -slug: Mozilla/Add-ons/SDK/Tutorials/Mobile_development -translation_of: Archive/Add-ons/Add-on_SDK/Tutorials/Mobile_development ---- -
-

Developing add-ons for Firefox Mobile is still an experimental feature of the SDK. Although the SDK modules used are stable, the setup instructions and cfx commands are likely to change.

-
-
-

To follow this tutorial you'll need to have installed the SDK and learned the basics of cfx.

-
-

Firefox for Android implements its UI using native Android widgets instead of XUL. With the add-on SDK you can develop add-ons that run on this new version of Firefox Mobile as well as on the desktop version of Firefox.

-

You can use the same code to target both desktop Firefox and Firefox Mobile, and just specify some extra options to cfx run, cfx test, and cfx xpi when targeting Firefox Mobile.

-

Right now not all modules are fully functional, but we're working on adding support for more modules. The tables at the end of this guide list the modules that are currently supported on Firefox Mobile.

-

This tutorial explains how to run SDK add-ons on an Android device connected via USB to your development machine. We'll use the Android Debug Bridge (adb) to communicate between the Add-on SDK and the device.

-

-

It's possible to use the Android emulator to develop add-ons for Android without access to a device, but it's slow, so for the time being it's much easier to use the technique described below.

-

Setting up the Environment

-

First you'll need an Android device capable of running the native version of Firefox Mobile. Then:

- -

On the development machine:

- -

Next, attach the device to the development machine via USB.

-

Now open up a command shell. Android Platform Tools will have installed adb in the "platform-tools" directory under the directory in which you installed the Android SDK. Make sure the "platform-tools" directory is in your path. Then type:

-
adb devices
-
-

You should see some output like:

-
List of devices attached
-51800F220F01564 device
-
-

(The long hex string will be different.)

-

If you do, then adb has found your device and you can get started.

-

Running Add-ons on Android

-

You can develop your add-on as normal, as long as you restrict yourself to the supported modules.

-

When you need to run the add-on, first ensure that Firefox is not running on the device. Then execute cfx run with some extra options:

-
cfx run -a fennec-on-device -b /path/to/adb --mobile-app fennec --force-mobile
-
-

See "cfx Options for Mobile Development" for the details of this command.

-

In the command shell, you should see something like:

-
Launching mobile application with intent name org.mozilla.fennec
-Pushing the addon to your device
-Starting: Intent { act=android.activity.MAIN cmp=org.mozilla.fennec/.App (has extras) }
---------- beginning of /dev/log/main
---------- beginning of /dev/log/system
-Could not read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'.
-info: starting
-info: starting
-zerdatime 1329258528988 - browser chrome startup finished.
-
-

This will be followed by lots of debug output.

-

On the device, you should see Firefox launch with your add-on installed.

-

console.log() output from your add-on is written to the command shell, just as it is in desktop development. However, because there's a lot of other debug output in the shell, it's not easy to follow. The command adb logcat prints adb's log, so you can filter the debug output after running the add-on. For example, on Mac OS X or Linux you can use a command like the below to filter only the lines of console output:

-
adb logcat | grep console
-
-

You can experiment with different filter strings on adb logcat to focus in on the lines relevant to you.

-

Running cfx test is identical:

-
cfx test -a fennec-on-device -b /path/to/adb --mobile-app fennec --force-mobile
-
-

cfx Options for Mobile Development

-

As you see in the quote above, cfx run and cfx test need four options to work on Android devices.

- - - - - - - - - - - - - - - - - - - - - - - -
-a fennec-on-deviceThis tells the Add-on SDK which application will host the add-on, and should be set to "fennec-on-device" when running an add-on on Firefox Mobile on a device.
-b /path/to/adb -

As we've seen, cfx uses the Android Debug Bridge (adb) to communicate with the Android device. This tells cfx where to find the adb executable.

-

You need to supply the full path to the adb executable.

-
--mobile-app -

This is the name of the Android intent. Its value depends on the version of Firefox Mobile that you're running on the device:

-
    -
  • fennec: if you're running Nightly
  • -
  • fennec_aurora: if you're running Aurora
  • -
  • firefox_beta: if you're running Beta
  • -
  • firefox: if you're running Release
  • -
-

If you're not sure, run a command like this (on OS X/Linux, or the equivalent on Windows):

-
-adb shell pm list packages | grep mozilla
-

You should see "package" followed by "org.mozilla." followed by a string. The final string is the name you need to use. For example, if you see:

-
-package:org.mozilla.fennec
-

...then you need to specify:

-
---mobile-app fennec
-

This option is not required if you have only one Firefox application installed on the device.

-
--force-mobile -

This is used to force compatibility with Firefox Mobile, and should always be used when running on Firefox Mobile.

-
-

Packaging Mobile Add-ons

-

To package a mobile add-on as an XPI, use the command:

-
cfx xpi --force-mobile
-
-

Actually installing the XPI on the device is a little tricky. The easiest way is probably to copy the XPI somewhere on the device:

-
adb push my-addon.xpi /mnt/sdcard/
-
-

Then open Firefox Mobile and type this into the address bar:

-
file:///mnt/sdcard/my-addon.xpi
-
-

The browser should open the XPI and ask if you want to install it.

-

Afterwards you can delete it using adb as follows:

-
adb shell
-cd /mnt/sdcard
-rm my-addon.xpi
-
-

-

Module Compatibility

-

Modules not supported in Firefox Mobile are marked in the tables below.

-

High-Level APIs

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addon-pageNot supported
base64Supported
clipboardNot supported
context-menuNot supported
hotkeysSupported
indexed-dbSupported
l10nSupported
notificationsSupported
page-modSupported
page-workerSupported
panelNot supported
passwordsSupported
private-browsingNot supported
querystringSupported
requestSupported
selectionNot supported
selfSupported
simple-prefsSupported
simple-storageSupported
systemSupported
tabsSupported
timersSupported
uiNot supported
urlSupported
widgetNot supported
windowsSupported
-

Low-Level APIs

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
loaderSupported
chromeSupported
console/plain-textSupported
console/tracebackSupported
content/contentSupported
content/loaderSupported
content/modSupported
content/workerSupported
core/heritageSupported
core/namespaceSupported
core/promiseSupported
event/coreSupported
event/targetSupported
frame/hidden-frameSupported
frame/utilsSupported
io/byte-streamsSupported
io/fileSupported
io/text-streamsSupported
lang/functionalSupported
lang/typeSupported
loader/cuddlefishSupported
loader/sandboxSupported
net/urlSupported
net/xhrSupported
places/bookmarksNot supported
places/faviconNot supported
places/historyNot supported
platform/xpcomSupported
preferences/serviceSupported
stylesheet/styleSupported
stylesheet/utilsSupported
system/environmentSupported
system/eventsSupported
system/globalsSupported
system/runtimeSupported
system/unloadSupported
system/xul-appSupported
tabs/utilsSupported
test/assertSupported
test/harnessSupported
test/httpdSupported
test/runnerSupported
test/utilsSupported
ui/button/actionNot supported
ui/button/toggleNot supported
ui/frameNot supported
ui/idSupported
ui/sidebarNot supported
ui/toolbarNot supported
util/arraySupported
util/collectionSupported
util/deprecateSupported
util/listSupported
util/match-patternSupported
util/objectSupported
util/uuidSupported
window/utilsSupported
-

 

-- cgit v1.2.3-54-g00ecf