Unfortunately you could easily replace Flash for JavaScript these days.
I wonder how long before the default is to brows with JavaScript turned off... or is it too integral to basic web pages now?
I think we will look back at the days when Flash was prevalent wish we could easily group all the advertising and cpu intensive scripts into a optional plugin.
As Flash once was. Maybe a grass-roots revolt is needed. Something akin to Apple refusing to allow Flash on iOS.
Imagine if js was throttled - or automatically disabled if a page was detected as being too resource-intensive? That would realign the incentives of user and content-producer and web-developers would find it considerably easier to argue for spending time on performance tuning.
I believe Google's using pagespeed as a factor in ranking is a small step in this direction. I hope someone goes all in.
Google tried doing something in that direction, by not running functions registered with setTimeout in certain cases (a pattern that's supposedly often used by ads on a site, impacting load time), thereby breaking a whole lot of legitimate cases along the way.
Reduced activity in background tabs
Waking CPU less often due to more optimal scheduling of JavaScript timers
Automatically pausing unused plug-ins
Reduced frame rate to 30 frames per second
Tuning video-playback parameters and forcing usage of hardware accelerated video codecs
Paused animations of browser themes
http://www.opera.com/blogs/desktop/2016/05/introducing-power...
http://stackoverflow.com/questions/15871942/how-do-browsers-...
This is a problem we've been working on for years building animated experiences for kids, and the js "equivalent" is heavy on assets and extremely limits what the artist and developer can produce in the same amount of time.
Didn't Adobe Animate[1] (the successor of Flash) allow you to convert a .fla file to Canvas (or WebGL)?
[1] https://helpx.adobe.com/animate/using/creating-publishing-ht...
"Unfortunately you could easily replace Flash for JavaScript these days [in that quote]."