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
こんにちはこんにちは! |
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
こんにちワン! |
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
wholeBlock: { | |
if (!plugins.libly) { | |
liberator.echoerr(__context__.NAME + ": Please install _libly.js."); | |
break wholeBlock; | |
} | |
if (!window.MochiKit) { | |
commandline.echo(<>{__context__.NAME}:<br/> |
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 Trampoline(func) { | |
this.task = new Task(func); | |
} | |
Trampoline.prototype.step = function() { | |
if (!this.task) return; | |
this.task = this.task.cont(); | |
if (this.task) this.task.nextStep = this.step.bind(this); | |
}; |
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 main() { | |
var d = accessAndShowEntries(); | |
d.addCallback(function() { | |
console.log("finish"); | |
}); | |
setTimeout(function() { | |
console.log("cancel!"); | |
d.cancel(); | |
}, 2500); | |
} |
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() { | |
var a = function() { print("a") }; | |
a(); //=> a | |
function a() { print("b"); } | |
a(); //=> a | |
})(); | |
(function() { | |
{ | |
var a = function() { print("a") }; |
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
"use strict"; | |
function loader() Components.classes["@mozilla.org/moz/jssubscript-loader;1"] | |
.getService(Components.interfaces.mozIJSSubScriptLoader); | |
var a = {}; | |
Object.defineProperty(a, "foo", {value: 1, writable: false}); | |
print("* directly assign"); | |
try { |
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
a=[1,2,3]; | |
a[200] = 0; | |
a[100] = 0; | |
for (x in a) { | |
print(x) | |
} |
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 deferredTimeout(delay) { | |
var deferred = new Deferred(); | |
setTimeout(function() { | |
deferred.callback({ | |
called: true | |
}) | |
}, | |
delay); | |
return deferred; | |
} |
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 deferredTimeout(delay) { | |
var deferred = new Deferred(); | |
window.setTimeout(function() { | |
deferred.callback({}); | |
}, | |
delay); | |
return deferred; | |
} | |
function yieldToAwait(src) { |
OlderNewer