Reducing notification permission prompt spam in Firefox
The UX pattern that should be observed is preflighting -- ask the user if they want notifications from within the webpage (if appropriate, obviously) and let them know it'll prompt a browser dialog.  If they say yes, you're good to go.  It's an extra step that significantly improves both conversion and experience, often used in mobile.