[Bug 11861] New: Need to say to spin the event loop until all sync sections have run before running a new script to make resourse selection algorithm predictable. See http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-August/027878.html