Closed syranide closed 10 years ago
@syranide
This is how it works if you set notify=errors
or notify=all
(e.g. react-hot?notify=all
). It will then dump errors in console and desktop Notification API (I'm open to adding notify=console
and making it default though).
What do you think?
Oh, had missed that :+1:
Personally I'm not really interested in desktop notifications (I keep the console open all the time) and wouldn't mind notify=console
, not that I really care (just click "deny"). The biggest reason I can see for it are other users viewing the dev site, they aren't really interested in desktop notifications for errors.
PS. Feel free to close this.
I think notify=console
would be really useful for default behavior so I'll leave this open for now.
Using notify=
on browsers without the notification API causes tons of 'Notification' is undefined
error spam.
I suppose we'd need to add a typeof Notification !== 'undefined'
check in requestPermission
and showNotification
. Would you like to submit a PR for this?
I could look into it if you want.
Thank you!
Any time! This is awesome (I'll try to spread the word on IRC whenever I can :)).
Personally I would prefer (if it is possible) if run-time errors during hot replacement would not reload the page, allowing me to fix any silly mistake and keep my state. If I modify the code enough that it's broken, it's easy enough to just reload manually.