Skip to content

Notification API fails without body #793

@kristopherbullinger

Description

@kristopherbullinger

Describe the bug
The Notification API fails with an error unless the optional parameter body is supplied.
let notification = new Notification("Notification Title", {body: "Notification Body"}); succeeds
let notification = new Notification("Notification Title"); fails with the following error:
failed to match a command for {"callback":"9d9a2890-18d6-d031-d56d-be20a946ca8d","error":"6c76ca20-51c3-9198-b1b4-d4c899e65ca7","cmd":"notification","options":{"title":"Notification Title"}}, missing field "body"

To Reproduce
Attempt to create a new Notification without specifying an options object.
new Notification("Notification title");

Expected behavior
The Notification API should adhere to the browser implementation which allows sending a notification without a body.

Platform and Versions:
OS: Darwin(19.5.0) - darwin/x64
Node: 14.0.0
NPM: 6.14.4
Yarn: N/A
Rustc: 1.44.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions