diff options
Diffstat (limited to 'files/fr/mozilla/add-ons/webextensions/api/runtime/connectnative')
| -rw-r--r-- | files/fr/mozilla/add-ons/webextensions/api/runtime/connectnative/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/fr/mozilla/add-ons/webextensions/api/runtime/connectnative/index.html b/files/fr/mozilla/add-ons/webextensions/api/runtime/connectnative/index.html index e52fb17054..e4a04221e2 100644 --- a/files/fr/mozilla/add-ons/webextensions/api/runtime/connectnative/index.html +++ b/files/fr/mozilla/add-ons/webextensions/api/runtime/connectnative/index.html @@ -35,7 +35,7 @@ translation_of: Mozilla/Add-ons/WebExtensions/API/runtime/connectNative <h2 id="Syntaxe">Syntaxe</h2> -<pre class="syntaxbox brush:js">var port = browser.runtime.connectNative( +<pre class="brush: js">var port = browser.runtime.connectNative( application // string ) </pre> @@ -62,7 +62,7 @@ translation_of: Mozilla/Add-ons/WebExtensions/API/runtime/connectNative <pre class="brush: js">/* On startup, connect to the "ping_pong" app. */ -var port = <code class="language-js">browser</code>.runtime.connectNative("ping_pong"); +var port = browser.runtime.connectNative("ping_pong"); /* Listen for messages from the app. @@ -74,14 +74,14 @@ port.onMessage.addListener((response) => { /* On a click on the browser action, send the app a message. */ -<code class="language-js">browser</code>.browserAction.onClicked.addListener(() => { +browser.browserAction.onClicked.addListener(() => { console.log("Sending: ping"); port.postMessage("ping"); });</pre> <p>{{WebExtExamples}}</p> -<div class="note"><strong>Remerciements :</strong> +<div class="note"><p><strong>Note :</strong></p> <p>Cette API est basée sur l'API Chromium <a href="https://developer.chrome.com/extensions/runtime#event-onConnect"><code>chrome.runtime</code></a>. Cette documentation est dérivée de <a href="https://chromium.googlesource.com/chromium/src/+/master/extensions/common/api/runtime.json"><code>runtime.json</code></a> dans le code de Chromium code.</p> |
