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
import { readFile } from 'fs'; | |
import { createServer } from 'http'; | |
createServer(async function (req, res) { | |
try { | |
var content = await readFile('foo.html'); | |
res.end(content); | |
} catch (e) { | |
res.end('ouch!'); | |
} |
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
PromisePolyfill.async = (function () { | |
"use strict"; | |
function Queue(capacity) { | |
this.capacity = this.snap(capacity); | |
this.length = 0; | |
this.front = 0; | |
this.initialize(); | |
} |
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
(function (global) { | |
"use strict"; | |
function Queue(capacity) { | |
this.capacity = this.snap(capacity); | |
this.length = 0; | |
this.front = 0; | |
this.initialize(); | |
} |
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
CancellablePromise.all = function (values) { | |
var CancellablePromise = this; | |
var child; | |
var children = []; | |
return new CancellablePromise(function (resolve, reject) { | |
if (!A.Lang.isArray(values)) { | |
reject(new TypeError('CancellablePromise.all expects an array of values or promises')); | |
return; | |
} |
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
CancellablePromise.all = function (values) { | |
var CancellablePromise = this; | |
var child; | |
var children = []; | |
return new CancellablePromise(function (resolve, reject) { | |
if (!A.Lang.isArray(values)) { | |
reject(new TypeError('CancellablePromise.all expects an array of values or promises')); | |
return; | |
} |
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
interface LoadRequest { | |
name: string; | |
address?: string; | |
source?: string; | |
metadata: Object; | |
} | |
interface Eventual<T> = T | Promise<T>; | |
interface ModuleInstantiator { |
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
class QueueItem { | |
constructor(value) { | |
this.value = value; | |
this.next = void 0; | |
} | |
} | |
class Queue { | |
constructor() { | |
this.first = void 0; |
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
<span id="yui_3_3_0_1_129815707302415" class="yui3-widget yui3-combobox yui3-combobox-focused"> | |
<input type="text" class="yui3-combobox-input" role="combobox" aria-expanded="true" aria-autocomplete="list" | |
aria-owns="yui_3_3_0_1_129815707302418" style="width: 106px; "/> | |
<ul class="yui3-combobox yui3-combobox-content" id="yui_3_3_0_1_129815707302418" role="listbox"> | |
<li class="yui3-combobox-option yui3-widget yui3-option yui3-option-content yui3-combobox-option-selected | |
yui3-option-selected" id="yui_3_3_0_1_129815707302446" role="option" tabindex="0">hello</li> | |
<li class="yui3-combobox-option yui3-widget yui3-option yui3-option-content" id="yui_3_3_0_1_129815707302466" | |
role="option" tabindex="-1">world</li> | |
</ul> | |
</span> |
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> | |
<html> | |
<head> | |
<title>ScrollView With Pagination</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<style> | |
/* Avoid resource latency for these, since they hide unenhanced content */ | |
.yui3-js-enabled .yui3-scrollview-loading { | |
visibility:hidden; |
OlderNewer