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/notification/onclick/index.html | 63 ------------------------ files/fr/web/api/notification/onclick/index.md | 63 ++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 files/fr/web/api/notification/onclick/index.html create mode 100644 files/fr/web/api/notification/onclick/index.md (limited to 'files/fr/web/api/notification/onclick') diff --git a/files/fr/web/api/notification/onclick/index.html b/files/fr/web/api/notification/onclick/index.html deleted file mode 100644 index b1561a4fe9..0000000000 --- a/files/fr/web/api/notification/onclick/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Notification.onclick -slug: Web/API/notification/onclick -tags: - - API - - DOM - - Notifications - - Propriété - - Reference - - onclick -translation_of: Web/API/Notification/onclick ---- -

{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}

- -

La propriété onclick, rattachée à l'interface {{domxref("Notification")}}, définit un gestionnaire d'évènement à déclencher lorsque la notification recçoit un évènement {{event("click")}} (qui se produit lorsqu'un utilisateur clique sur la notification).

- -

Syntaxe

- -
Notification.onclick = function(event) { ... };
-
- -

Le comportement par défaut consiste à déplacer le focus sur la zone d'affichage (viewport) du contexte de navigation de la notification. Pour éviter ce comportement, on pourra appeler la méthode preventDefault() sur l'objet représentant l'évènement.

- -

Exemples

- -

Dans l'exemple qui suit, on utilise le gestionnaire d'évènement onclick pour ouvrir une page dans un nouvel onglet (avec le paramètre '_blank') lorsqu'on clique sur la notification :

- -
notification.onclick = function(event) {
-  event.preventDefault(); // empêcher le navigateur de passer le focus sur l'onglet de la navigation
-  window.open('http://www.mozilla.org', '_blank');
-}
- -

Spécifications

- - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('Web Notifications','#dom-notification-onclick','onclick')}}{{Spec2('Web Notifications')}}Standard évolutif
- -

Compatibilité des navigateurs

- - - -

{{Compat("api.Notification.onclick")}}

- -

Voir aussi

- - diff --git a/files/fr/web/api/notification/onclick/index.md b/files/fr/web/api/notification/onclick/index.md new file mode 100644 index 0000000000..b1561a4fe9 --- /dev/null +++ b/files/fr/web/api/notification/onclick/index.md @@ -0,0 +1,63 @@ +--- +title: Notification.onclick +slug: Web/API/notification/onclick +tags: + - API + - DOM + - Notifications + - Propriété + - Reference + - onclick +translation_of: Web/API/Notification/onclick +--- +

{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}

+ +

La propriété onclick, rattachée à l'interface {{domxref("Notification")}}, définit un gestionnaire d'évènement à déclencher lorsque la notification recçoit un évènement {{event("click")}} (qui se produit lorsqu'un utilisateur clique sur la notification).

+ +

Syntaxe

+ +
Notification.onclick = function(event) { ... };
+
+ +

Le comportement par défaut consiste à déplacer le focus sur la zone d'affichage (viewport) du contexte de navigation de la notification. Pour éviter ce comportement, on pourra appeler la méthode preventDefault() sur l'objet représentant l'évènement.

+ +

Exemples

+ +

Dans l'exemple qui suit, on utilise le gestionnaire d'évènement onclick pour ouvrir une page dans un nouvel onglet (avec le paramètre '_blank') lorsqu'on clique sur la notification :

+ +
notification.onclick = function(event) {
+  event.preventDefault(); // empêcher le navigateur de passer le focus sur l'onglet de la navigation
+  window.open('http://www.mozilla.org', '_blank');
+}
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('Web Notifications','#dom-notification-onclick','onclick')}}{{Spec2('Web Notifications')}}Standard évolutif
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("api.Notification.onclick")}}

+ +

Voir aussi

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