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
var myApplet = funcToGetApplet(); | |
myApplet.setCallback({ | |
myMethod: function (args) { | |
// do something with args here | |
}, | |
anotherMethod: function (args) { | |
// do something with args here |
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
/* | |
cujo.Stateful | |
(c) copyright 2010, unscriptable.com | |
author: john | |
LICENSE: see the LICENSE.txt file. If file is missing, this file is subject to the AFL 3.0 | |
license at the following url: http://www.opensource.org/licenses/afl-3.0.php. | |
Adds dojo.Stateful behavior to objects without the dojo.declare turds and overhead |
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
<!-- dojo 1.x: all is well --> | |
<button dojotype="li.widget.Button" type="button" class="flat">Flat button</button> | |
<!-- dojo 1.6 html5 type and params attr --> | |
<button data-dojo-type="li.widget.Button" data-dojo-params="type:'button', class:'primary'">Primary button</button> | |
<!-- dojo 1.6 html5 type and native attrs: DOES NOT PICK UP ATTRS! --> | |
<button data-dojo-type="li.widget.Button" type="button" class="secondary">Secondary button</button> |
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
// (c) copyright unscriptable.com / John Hann | |
// License MIT | |
// For more robust promises, see https://github.com/briancavalier/when.js. | |
function Promise () { | |
this._thens = []; | |
} | |
Promise.prototype = { |
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
// Object Pascal separates each unit (file) into two main sections: | |
// interface and implementation. | |
// interface declares all of the publicly-facing stuff and has a | |
// list of dependencies (uses) implementation is the actual code | |
// and is private. it can have additional dependencies that the | |
// the interface doesn't have (and it's a good idea to keep as | |
// many out of the interface as possible to prevent circular | |
// dependencies). | |
module('optional name') |
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
[{"match":"/BlackBerry.+AppleWebKit\\/([\\d\\.]+)/","name":"BlackBerry","version":400,"has":{"activex":false,"activex-enabled":false,"array-es5":true,"array-every":true,"array-filter":true,"array-foreach":true,"array-indexof":true,"array-isarray":true,"array-lastindexof":true,"array-map":true,"array-reduce":true,"array-reduceright":true,"array-slice-nodelist":true,"array-some":true,"audio":true,"audio-m4a":true,"audio-mp3":true,"audio-ogg":true,"audio-wav":true,"bug-arguments-instanceof-array":false,"bug-array-concat-arguments":false,"bug-bgimagecache":true,"bug-computed-style-hidden-zero-height":false,"bug-computed-values-for-static":false,"bug-contains":false,"bug-dontenum-enumerable":false,"bug-es5-regexp":true,"bug-es5-trim":true,"bug-function-expression":false,"bug-getelementbyid-ids-names":false,"bug-getelementbyid-ignores-case":false,"bug-getelementsbyname":false,"bug-getelementsbytagname-returns-comment-nodes":false,"bug-offset-values-positioned-inside-static":false,"bug-overflow-style":false,"bug-pre |
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
Firefox: | |
script1 executes | |
script1 fires load event | |
script2 executes | |
script2 fires load event | |
script3 executes | |
script3 fires load event |
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
// admittedly, dependency injection is better for non-integral dependencies. | |
// integral dependencies like coding constructs such as array iterators (forEach), | |
// type detectors (isArray, isFunction), etc are easier to work with as declared | |
// dependencies/modules. there are other ways to inject dependencies (e.g. | |
// constructor params). this is just how we're doing it. | |
// this example shows the injection of non-integral dependencies | |
define(function () { | |
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
// This boilerplate would allow a module to run in node.js or an | |
// AMD-enabled browser environment. On node.js, the syntax is: | |
// var Color = require("./Color").Color, | |
// color = new Color("#BADA55"); | |
// In the browser, the syntax is: | |
// var color = new Color("#BADA55"); // window.Color is implied | |
(function (define) { | |
define(function () { |