From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/navigator/mozislocallyavailable/index.html | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 files/fr/web/api/navigator/mozislocallyavailable/index.html (limited to 'files/fr/web/api/navigator/mozislocallyavailable') diff --git a/files/fr/web/api/navigator/mozislocallyavailable/index.html b/files/fr/web/api/navigator/mozislocallyavailable/index.html new file mode 100644 index 0000000000..cb28647309 --- /dev/null +++ b/files/fr/web/api/navigator/mozislocallyavailable/index.html @@ -0,0 +1,34 @@ +--- +title: window.navigator.isLocallyAvailable +slug: Web/API/Navigator/mozIsLocallyAvailable +tags: + - Référence_du_DOM_Gecko +translation_of: Web/API/Navigator/mozIsLocallyAvailable +--- +

{{ ApiRef() }}

+

Résumé

+

Permet de déterminer si une ressource donnée est disponible.

+

Syntaxe

+
window.navigator.isLocallyAvailable(uri,ifOffline);
+
+ +

Exemple

+
var disponible = navigator.isLocallyAvailable("my-image-file.png", true);
+if (disponible) {
+  /* la ressource hors ligne est présente */
+} else {
+  alert("Certaines ressources nécessaires ne sont pas disponibles tant que vous ne serez pas connecté au réseau.");
+}
+
+

Notes

+

{{ Note("Des exceptions de sécurité peuvent se produire si l\'URI demandée n\'est pas de la même origine.") }}

+

Spécification

+

Aucune ; cependant certaines informations sont disponibles : Marking Resources for Offline Use

+

 

+

 

+
+  
+

{{ languages( { "en": "en/DOM/window.navigator.mozIsLocallyAvailable", "ja": "ja/DOM/window.navigator.mozIsLocallyAvailable" } ) }}

-- cgit v1.2.3-54-g00ecf