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
eventsource | |
go-eventsource | |
client/client |
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
// Let `doAjax`, `fadeIn`, `fadeOut`, and `delay` be promise-returning functions. | |
// In all the following examples, `example` is meant to return a promise that is fulfilled when | |
// all operations are completed, or rejected if any of the steps fail. | |
// ES5 | |
function example() { | |
return doAjax("data.json").then(function (data) { | |
document.getElementById("data").innerText = data; |
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
/** | |
* The sample usage of ECMA 5 Mozilla Features Implemented in V8 | |
* https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 | |
* You can use thease new feature of ECMA5 on Node.js as you like. | |
* because there is no IE :) | |
* Order is deferent form original wiki. | |
* Sources are Checked on Node.js v0.5.0(unstable), v0.4.9(stable) | |
* | |
* you can execute this file. | |
* $ node ecma5_on_v8.js |