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] Add support to Notification API and PushManager API #96

Open
AniramOcean opened this issue May 29, 2023 · 0 comments
Open

[FEATURE] Add support to Notification API and PushManager API #96

AniramOcean opened this issue May 29, 2023 · 0 comments
Assignees

Comments

@AniramOcean
Copy link

🚀 Feature request

Is your feature request related to a problem?

I'm always frustrated when I need to use the Notification API and PushManager API in the ng-web-apis. The library currently lacks support for these APIs. This forces me to make some workarounds, using non-ideal techniques.

Describe the solution you'd like

I'd like to request the addition of support for the Notification API and PushManager API in the library. It would be cool if these APIs could be accessed through an injectable token in the constructor like a NAVIGATOR or a WINDOW, that allows for more maintainable code.

Describe alternatives you've considered

I'm currently using the makeshift approach:

constructor(@Inject(WINDOW) private readonly window: Window) {}

//  acces PushManager API
this.window['PushManager']

// check Notification API support
windowNotification = 'Notification' in this.window || this.window['Notification'];

However, this workaround bypasses the advantages of dependency injection and can lead to less maintainable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 💡 Backlog
Development

No branches or pull requests

3 participants