From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- files/fr/web/api/window/pageshow_event/index.html | 110 ---------------------- files/fr/web/api/window/pageshow_event/index.md | 110 ++++++++++++++++++++++ 2 files changed, 110 insertions(+), 110 deletions(-) delete mode 100644 files/fr/web/api/window/pageshow_event/index.html create mode 100644 files/fr/web/api/window/pageshow_event/index.md (limited to 'files/fr/web/api/window/pageshow_event') diff --git a/files/fr/web/api/window/pageshow_event/index.html b/files/fr/web/api/window/pageshow_event/index.html deleted file mode 100644 index 4687409333..0000000000 --- a/files/fr/web/api/window/pageshow_event/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: pageshow -slug: Web/API/Window/pageshow_event -translation_of: Web/API/Window/pageshow_event -original_slug: Web/Events/pageshow ---- -

L’évènement pageshow est émis lorsqu’une entrée dans un historique de session est atteinte (cela comprend les boutons précédent / suivant ainsi que l’affichage initial de la page après l’évènement onload).

- -

Informations générales

- -
-
Spécification
-
HTML5
-
Interface
-
PageTransitionEvent
-
Bouillonne
-
Non
-
Annulable
-
Non
-
Cible
-
Document (dispatché sur Window)
-
Action par défaut
-
Aucune
-
- -

Propriétés

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropriétéTypeDescription
target {{readonlyInline}}{{domxref("EventTarget")}}La cible de l’évènement (la plus haute dans l’arbre DOM).
type {{readonlyInline}}{{domxref("DOMString")}}Le type d’évènement.
bubbles {{readonlyInline}}{{jsxref("Boolean")}}Si l’évènement bouillonne en temps normal ou non.
cancelable {{readonlyInline}}{{jsxref("Boolean")}}Si l’évènement est annulable ou non.
persisted {{readonlyInline}}{{jsxref("boolean")}}Si l’entrée est chargée depuis le cache ou non.
- -

Exemples

- -

L’exemple suivant va afficher dans la console des informations sur l’évènement pageshow, qui est émis à l’utilisation des boutons précédent / suivant, et pas uniquement après onload :

- -
window.addEventListener('pageshow', function(event) {
-    console.log('pageshow:');
-    console.log(event);
-});
- -

Bien que ce ne soit pas la meilleure pratique, vous pouvez également ajouter l’évènement comme un attribut sur la balise <body>, de la même manière que onload :

- -
<body onload="myonload()" onpageshow="mypageshowcode()">
- -

Spécifications

- - - - - - - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('HTML WHATWG', 'browsing-the-web.html#event-pageshow', 'pageshow')}}{{Spec2('HTML WHATWG')}}Spécification initiale.
{{SpecName('HTML5 W3C', 'browsers.html#event-pageshow', 'pageshow')}}{{Spec2('HTML5 W3C')}}
- -

Compatibilité des navigateurs

- -

{{Compat("api.Window.pageshow_event")}}

- -

Voir aussi

- - diff --git a/files/fr/web/api/window/pageshow_event/index.md b/files/fr/web/api/window/pageshow_event/index.md new file mode 100644 index 0000000000..4687409333 --- /dev/null +++ b/files/fr/web/api/window/pageshow_event/index.md @@ -0,0 +1,110 @@ +--- +title: pageshow +slug: Web/API/Window/pageshow_event +translation_of: Web/API/Window/pageshow_event +original_slug: Web/Events/pageshow +--- +

L’évènement pageshow est émis lorsqu’une entrée dans un historique de session est atteinte (cela comprend les boutons précédent / suivant ainsi que l’affichage initial de la page après l’évènement onload).

+ +

Informations générales

+ +
+
Spécification
+
HTML5
+
Interface
+
PageTransitionEvent
+
Bouillonne
+
Non
+
Annulable
+
Non
+
Cible
+
Document (dispatché sur Window)
+
Action par défaut
+
Aucune
+
+ +

Propriétés

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropriétéTypeDescription
target {{readonlyInline}}{{domxref("EventTarget")}}La cible de l’évènement (la plus haute dans l’arbre DOM).
type {{readonlyInline}}{{domxref("DOMString")}}Le type d’évènement.
bubbles {{readonlyInline}}{{jsxref("Boolean")}}Si l’évènement bouillonne en temps normal ou non.
cancelable {{readonlyInline}}{{jsxref("Boolean")}}Si l’évènement est annulable ou non.
persisted {{readonlyInline}}{{jsxref("boolean")}}Si l’entrée est chargée depuis le cache ou non.
+ +

Exemples

+ +

L’exemple suivant va afficher dans la console des informations sur l’évènement pageshow, qui est émis à l’utilisation des boutons précédent / suivant, et pas uniquement après onload :

+ +
window.addEventListener('pageshow', function(event) {
+    console.log('pageshow:');
+    console.log(event);
+});
+ +

Bien que ce ne soit pas la meilleure pratique, vous pouvez également ajouter l’évènement comme un attribut sur la balise <body>, de la même manière que onload :

+ +
<body onload="myonload()" onpageshow="mypageshowcode()">
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('HTML WHATWG', 'browsing-the-web.html#event-pageshow', 'pageshow')}}{{Spec2('HTML WHATWG')}}Spécification initiale.
{{SpecName('HTML5 W3C', 'browsers.html#event-pageshow', 'pageshow')}}{{Spec2('HTML5 W3C')}}
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.Window.pageshow_event")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf