1. A computer-implemented method for processing resources on a multi-threaded browser, comprising: using a main thread included in the multi-threaded browser to initialize a plurality of virtual machines for processing a resource having a plurality of code segments wherein each virtual machine processes a respective code segment of the resource; scheduling, using the main thread, a plurality of events for processing the plurality of code segments of the resource in parallel, wherein the scheduling further comprises for each event: cooperatively mapping the main thread within the multi-threaded browser to a UI thread executing within a respective virtual machine; activating a respective event handler within the UI thread of each respective virtual machine to assign the event in the cooperatively mapped main thread included in the browser to the UI thread included in the respective virtual machine; and executing the event using the respective virtual machine.