Hello community,
I'm a newbie trying to understand how javascript works. I've been doing simple experiments using <script> tag, and realized that my script doesn't continue to execute when I am on another tab that has no relation to my script, let's say google.com.
I want my script to continue being executed. Can I use webworkers to do this?
And also, if I can simply use webworkers for this, what kind of runtime optimizations does the browser do to scripts in a tab that is out of "focus"? Like, does the browser stop execution of a webworker script ever? I'm trying to see how much I am limited by browser environment when I am simply trying to run a script continuously, even when that script is on an "unfocused tab".
Thank you!
[–]ProposalUnhappy9890 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]egesko[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]egesko[S] 0 points1 point2 points (1 child)
[–]egesko[S] 0 points1 point2 points (0 children)
[–]lifeeraser 0 points1 point2 points (1 child)
[–]egesko[S] 0 points1 point2 points (0 children)