Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow suspending web content timers #4907
Comments
|
I'm willing to take my shot working on this task. During the IRC conversation with @jdm I've managed to figure out whats could be the best approach for implementing suspend/resume functionality, this comments is brief technical approach for the change. Changes:
I'm still not sure how testing for newly introduced code should be done, any ideas ? |
|
There are two ways to test your code - either integrate it with the session history, or add some temporary methods to If you want to try the session history integration, the back/forward code in http://mxr.mozilla.org/servo/source/components/compositing/constellation.rs#855 could use the script_chan in the pipeline to send a message to the ScriptTask that causes |
When navigating away from a page, it should be frozen. Part of that is suspending any existing timers (ie. setTimeout and setInterval), so the timer cancellation code in
timers.rsshould be expanded to include suspending and resuming them.