Domanda

I'm reading up on developing GWT apps and read an excerpt from this page:

Any script that runs without returning control to the JavaScript main event loop for more than 10 seconds or so runs the risk of having the browser popup this dialog to the user...

Is this JavaScript main event loop a JS construct, a GWT construct, or something that's browser-specific? How does it relate to client-side GWT apps? Thanks in advance!

È stato utile?

Soluzione

JavaScript code is generally structured as a set of event handlers, where an event can be the user clicking a link, the mouse entering or leaving a particular component, the completion of an Ajax request, etc. The main event loop is the central routine in the browser responsible for queueing up these events as they occur and calling the handler functions. Browsers generally execute all event handlers on a single thread, so if one handler takes a long time to run it will make the page appear unresponsive as other user initiated events can't be handled in a timely fashion.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top