Closed craftoid closed 11 years ago
Most of the calculation time is spend rendering/loading the SVG. Unfortunately aborting SVG loading once it started is not possible.
Rewriting the URL while it is being loaded would result in undefined behaviour, probably even locking the browser.
To prevent this from happening at all, we check if the SVG is loaded before starting the turtle worker inside the testCode function.
The callback was just to introduce a little bit of model/view separation. So the code that loads the SVG is independent from the one that switches the state of the buttons...
Most of the calculation time is spend rendering/loading the SVG. Unfortunately aborting SVG loading once it started is not possible.
Rewriting the URL while it is being loaded would result in undefined behaviour, probably even locking the browser.
To prevent this from happening at all, we check if the SVG is loaded before starting the turtle worker inside the testCode function.