Firefox Tomorrow

web api instance property

Notification: body property

View on MDN ↗

Secure context Available in workers

The body read-only property of the Notification interface indicates the body string of the notification, as specified in the body option of the Notification() constructor.

Value

A string.

Examples

function spawnNotification(theBody, theIcon, theTitle) {
  const options = {
    body: theBody,
    icon: theIcon,
  };
  const n = new Notification(theTitle, options);

  console.log(n.body);
}

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also