Notification: data property - Web APIs | MDN

Value

A structured clone.

Examples

The following snippet fires a notification; a simple options object is created, then the notification is fired using the Notification() constructor.

js

const options = {
  body: "Your code submission has received 3 new review comments.",
  data: {
    url: "https://example.com/review/12345",
    status: "open",
  },
};

const n = new Notification("New review activity", options);

console.log(n.data); // Logs the data object

Specifications

Specification
Notifications API
# dom-notification-data

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.