Narrative JavaScript
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
URL Tag Cloud
Bookmark History
Saved by 3 people (1 private), first by anonymouse user on 2006-10-26
- Alfredwesterveld on 2008-05-06 - Tags narrative , javascript
- Farrider on 2007-07-19 - Tags javascript
- Jcbuffington on 2006-10-26 - Tags ajax , javascript
Public Sticky notes
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. Narrative
JavaScript provides a yielding operator for functions
which block until the firing of an event. The function yields
execution until the callback is fired, and then resumes execution
at the point where it yielded. This allows
you to write hard-to-read asynchronous event handling in simple, linear,
readable code.
Highlighted by alfredwesterveld


Public Comment
on 2006-10-26 by jcbuffington