Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Technically, <strong>yes</strong>, but I wouldn't do that on a website.</p> <p>Take a look at <a href="http://neilmix.com/narrativejs/doc/index.html" rel="nofollow noreferrer">Narrative JavaScript</a>, which is based off <a href="http://en.wikipedia.org/wiki/Narcissus_(JavaScript_engine)" rel="nofollow noreferrer">Narcissus</a>.</p> <blockquote> <p>Narrative JavaScript is a small extension to the JavaScript language that enables blocking capabilities for asynchronous event callbacks. This makes asynchronous code refreshingly readable and comprehensible. </p> </blockquote> <p><a href="http://seleniumhq.org/" rel="nofollow noreferrer">Selenium</a> uses this technology.</p> <hr> <h2>Update</h2> <p>Check out <a href="http://web.archive.org/web/20090408072615/http://www.xucia.com/strands-doc/index.html" rel="nofollow noreferrer">JavaScript Strands</a>:</p> <blockquote> <p>JavaScript Strands adds coroutine and cooperative threading support to the JavaScript language to enable blocking capabilities for asynchronous event callbacks. This makes code that utilizes asynchronous operation much more linear, readable, and manageable. Strands is built upon Narrative JavaScript written by Neil Mix, and much of Narrative JavaScript has remained in Strands including much of this documentation.</p> <p>In JavaScript your code can't simply wait until an event has fired -- the event must always be handled by a separate, asynchronous event handler. Sometimes this is fine, but it often forces what ought to be a simple sequence of statements into gnarly contortions. It also breaks the ability to encapsulate functionality because calling functions must know to provide a callback handler. Strands provides the ability to suspend and resume threads of execution. Execution can suspend resume when the event is finished. This allows you to write hard-to-read asynchronous event handling in simple, linear, readable code that encapsulates implementation.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload