aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/window/pageshow_event
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/window/pageshow_event')
-rw-r--r--files/fr/web/api/window/pageshow_event/index.md128
1 files changed, 41 insertions, 87 deletions
diff --git a/files/fr/web/api/window/pageshow_event/index.md b/files/fr/web/api/window/pageshow_event/index.md
index 4687409333..112cdea1ba 100644
--- a/files/fr/web/api/window/pageshow_event/index.md
+++ b/files/fr/web/api/window/pageshow_event/index.md
@@ -4,107 +4,61 @@ slug: Web/API/Window/pageshow_event
translation_of: Web/API/Window/pageshow_event
original_slug: Web/Events/pageshow
---
-<p>L’évènement <code>pageshow</code> 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 <code>onload</code>).</p>
+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`).
-<h2 id="Informations_générales">Informations générales</h2>
+## Informations générales
-<dl>
- <dt>Spécification</dt>
- <dd><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow">HTML5</a></dd>
- <dt>Interface</dt>
- <dd><a href="/fr/docs/Web/API/PageTransitionEvent">PageTransitionEvent</a></dd>
- <dt>Bouillonne</dt>
- <dd>Non</dd>
- <dt>Annulable</dt>
- <dd>Non</dd>
- <dt>Cible</dt>
- <dd>Document (dispatché sur Window)</dd>
- <dt>Action par défaut</dt>
- <dd>Aucune</dd>
-</dl>
+- Spécification
+ - : [HTML5](http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow)
+- Interface
+ - : [PageTransitionEvent](/fr/docs/Web/API/PageTransitionEvent)
+- Bouillonne
+ - : Non
+- Annulable
+ - : Non
+- Cible
+ - : Document (dispatché sur Window)
+- Action par défaut
+ - : Aucune
-<h2 id="Propriétés">Propriétés</h2>
+## Propriétés
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Propriété</th>
- <th scope="col">Type</th>
- <th scope="col">Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>target</code> {{readonlyInline}}</td>
- <td>{{domxref("EventTarget")}}</td>
- <td>La cible de l’évènement (la plus haute dans l’arbre DOM).</td>
- </tr>
- <tr>
- <td><code>type</code> {{readonlyInline}}</td>
- <td>{{domxref("DOMString")}}</td>
- <td>Le type d’évènement.</td>
- </tr>
- <tr>
- <td><code>bubbles</code> {{readonlyInline}}</td>
- <td>{{jsxref("Boolean")}}</td>
- <td>Si l’évènement bouillonne en temps normal ou non.</td>
- </tr>
- <tr>
- <td><code>cancelable</code> {{readonlyInline}}</td>
- <td>{{jsxref("Boolean")}}</td>
- <td>Si l’évènement est annulable ou non.</td>
- </tr>
- <tr>
- <td><code>persisted</code> {{readonlyInline}}</td>
- <td>{{jsxref("boolean")}}</td>
- <td>Si l’entrée est chargée depuis le cache ou non.</td>
- </tr>
- </tbody>
-</table>
+| Propriété | Type | Description |
+| ------------------------------------- | ------------------------------------ | --------------------------------------------------------- |
+| `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. |
-<h2 id="Exemples">Exemples</h2>
+## Exemples
-<p>L’exemple suivant va afficher dans la console des informations sur l’évènement <code>pageshow</code>, qui est émis à l’utilisation des boutons précédent / suivant, et pas uniquement après <code>onload</code> :</p>
+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` :
-<pre class="brush: js">window.addEventListener('pageshow', function(event) {
+```js
+window.addEventListener('pageshow', function(event) {
console.log('pageshow:');
console.log(event);
-});</pre>
+});
+```
-<p>Bien que ce ne soit pas la meilleure pratique, vous pouvez également ajouter l’évènement comme un attribut sur la balise <code>&lt;body&gt;</code>, de la même manière que <code>onload</code> :</p>
+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` :
-<pre class="brush: html">&lt;body onload="myonload()" onpageshow="mypageshowcode()"&gt;</pre>
+```html
+<body onload="myonload()" onpageshow="mypageshowcode()">
+```
-<h2 id="Specifications">Spécifications</h2>
+## Spécifications
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">Statut</th>
- <th scope="col">Commentaire</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('HTML WHATWG', 'browsing-the-web.html#event-pageshow', 'pageshow')}}</td>
- <td>{{Spec2('HTML WHATWG')}}</td>
- <td>Spécification initiale.</td>
- </tr>
- <tr>
- <td>{{SpecName('HTML5 W3C', 'browsers.html#event-pageshow', 'pageshow')}}</td>
- <td>{{Spec2('HTML5 W3C')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
+| Spécification | Statut | Commentaire |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------------------- |
+| {{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')}} | |
-<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2>
+## Compatibilité des navigateurs
-<p>{{Compat("api.Window.pageshow_event")}}</p>
+{{Compat("api.Window.pageshow_event")}}
-<h2 id="See_also">Voir aussi</h2>
+## Voir aussi
-<ul>
- <li>{{domxref("Window.pagehide_event", "pagehide")}}</li>
-</ul>
+- {{domxref("Window.pagehide_event", "pagehide")}}