开发者

Does the Javascript VM that runs as part of iOS allow for program interrupt and continue?

开发者 https://www.devze.com 2023-01-27 10:03 出处:网络
For example, imagine a Javascript app running in Safari, containing some local in memory state, and is partway through execution (say, it\'s spinning an animated ball). What happens if the phone rings

For example, imagine a Javascript app running in Safari, containing some local in memory state, and is partway through execution (say, it's spinning an animated ball). What happens if the phone rings and I pick up? Will the animation continue from where it left off when I return to the browser?

If Safari doesn't开发者_JAVA百科 do this - is there a phone based web browser that does?


I think the animation/script will stop because I doubt that's part of background processing on iOS. I guess the animation will continue when you return to the app.

Otherwise a badly coded script might drain your battery even if Safari is not the active app.


The current javascript vm does not seem to allow for this.

0

精彩评论

暂无评论...
验证码 换一张
取 消