4 ms·
So now there's some awesome PWA api giving you all those native features, and a permissions model, and so you install SUPERPHONE app, and that needs access to y
by hamiltonkibbe 8y ago
So now there's some awesome PWA api giving you all those native features, and a permissions model, and so you install SUPERPHONE app, and that needs access to your contacts and to make and receive calls, and you say "ok, yeah this is a better phone app so those are reasonable".
Now everything running JS in the context of $SUPERPHONE_DOMAIN or whatever has these new permissions. superphone pwa's calls to window.PwaGetContacts() and window.PwaMakeCall() work and everyone's happy, and your phone really is super now. the app shows a banner ad from google and you're cool with that because it was free, and hey, developers need to eat too.
Someone who makes ads figures out that ads can run JS. So your app pulls down an ad from some ad network and that ad has some cool JS that detects that those functions are available and starts calling all your friends from your phone and telling them that "`window.PwaGetOwnerName()` is really excited about LinkedIn and wants you to be their contact" after uploading your contact list to every 3rd party data broker that would pay for it.
well, that sucks, maybe there's a better way to limit the code that can run on your phone with specific permissions