This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global SM:true*/ | |
'use strict'; | |
// Publish a very special, promise-compatible event that supports the default | |
// function behavior to chain on internally created promises before executing | |
// the after() subs. on() subs can still e.preventDefault(), which will | |
// reject the promise and thus skip the default behavior and after() subs. | |
var asyncEvent = eventTarget.publish('foo'); | |
asyncEvent._firing = new Y.Promise(function (resolve) { resolve(); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>DT Destroy</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
</head> | |
<body class="yui3-skin-sam"> | |
<button id="btnRebuild">Rebuild it!</button> | |
<div>build times: <span id="count"></span></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example reading multiple databaserequests simultaniously | |
* while calling the callback-Fn only when all request have finished | |
* | |
* In this example, we want to read a table with all area's in a specific country. | |
* From there on, from every area we need to know the citienames and population, which resides in a second table. | |
* | |
* In some situations, this might be done with one statement using INNER JOIN, but there are cases where you need multiple requests. (performance or limitation) | |
* | |
* The array is build, has this form: |