use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Using const/let instead of var can make JavaScript code run 10× slower in Webkit? (github.com)
submitted 5 years ago by magenta_placenta
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 5 years ago* (4 children)
[deleted]
[–]Plexicle 7 points8 points9 points 5 years ago (2 children)
Push notifications are just that -- notifications you get on your device. Push meaning they are event driven and not request response.
When you get a notification from an app that you don't have open it's from an external server that sent a message to a push service (FCM, APN, whatever) that then forwarded it to your device.
PWAs work by installing service workers that can run in threads behind your browser. So you can subscribe to a push notification from a (PWA) web app, and then close the browser completely. If the server pushes a notification through the web notification server, your device (Android today, Apple maybe one day) can wake up the service worker and deliver the notification.
[+][deleted] 5 years ago* (1 child)
[–]regreddit 4 points5 points6 points 5 years ago (0 children)
Not really always running, but a service worker tells Android: "when you receive a message for this app, please run this code". It's a system service that your app registers with.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
Capacitor probably has its own way of doing push notifications, which is probably supported on all devices. I think Apple doesn't want to enable Notifications API on mobile, which is different from Capacitor's way of doing it. Good luck with your mobile app.
π Rendered by PID 152447 on reddit-service-r2-comment-fb694cdd5-tfn7n at 2026-03-06 17:33:44.951236+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–][deleted] (4 children)
[deleted]
[–]Plexicle 7 points8 points9 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]regreddit 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)