aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/notification/data/index.md
blob: 2e0bbd45e2440fe3ddff6496eeb3f69a74d85074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: Notification.data
slug: Web/API/notification/data
tags:
  - API
  - API Notifications
  - Notification
  - Notifications
  - Propriété
  - Reference
  - données
translation_of: Web/API/Notification/data
---
{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}

La propriété en lecture seule **`data`** de l'interface {{domxref ("Notification")}} renvoie un clone structuré des données de la notification, comme définis à l'aide de l'option `data`  lors de la création de la notification à l'aide du constructeur {{domxref ("Notification.Notification", "Notification() ")}}.

Les données de la notification peuvent être des données arbitraires, sans restriction de format que vous souhaitez associer à la notification.

## Syntaxe

    Notification.data

### Valeur

Un clone structuré.

## Spécifications

| Spécification                                                                            | État                                     | Commentaire          |
| ---------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------- |
| {{SpecName('Web Notifications','#dom-notification-data','data')}} | {{Spec2('Web Notifications')}} | Définition initiale. |

## Compatibilité des navigateurs

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

## Voir également

- [Utilisation de l'API Notifications](/fr/docs/Web/API/Notifications_API/Using_the_Notifications_API)