Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support declarative web push #129

Open
AlexGustafsson opened this issue Feb 8, 2025 · 1 comment
Open

Feature Request: Support declarative web push #129

AlexGustafsson opened this issue Feb 8, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@AlexGustafsson
Copy link
Owner

User stories

  • As a user I want to receive notifications when updates are available

Feature description

By using "declarative web push" proposed by WebKit we can rather easily support nice push notifications to users. The same server-side API could be used to support third-party integrations.

See: https://github.com/WebKit/explainers/blob/main/DeclarativeWebPush/README.md

@AlexGustafsson AlexGustafsson added the enhancement New feature or request label Feb 8, 2025
@AlexGustafsson
Copy link
Owner Author

Right now, only Safari Technology Preview supports declarative web push. It does not seem to be connected to a push service, though. You'll get a request to allow push messages, but the promise never resolves.

Test.

let button = document.createElement('button')
document.body.appendChild(button)
button.onclick = () => {
pushManager.subscribe({userVisibleOnly: true, applicationServerKey: "BNEAYHIBammqknCovdHsGz9ORczAYsJ__povyj2TKTkBeVULYs9DDC3c-wNHGOiY6fijxHfcfL1Cw8BY758ch-c"})
}
button.style = "width: 100px;height: 100px;background-color: red;"
Unhandled Promise Rejection: AbortError: Connection to web push daemon failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant