This file contains hidden or 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
Animal - this {} | |
Animal - debug: [ muppet , bert ] | |
Hello, my name is bert and I am a muppet | |
returned: { species: 'muppet', name: 'bert' } | |
**************************************** | |
Muppet - this {} | |
Muppet - debug: [ ernie ] | |
Animal - this {} | |
Animal - debug: [ muppet , ernie ] | |
Hello, my name is ernie and I am a muppet |
This file contains hidden or 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
define(["./base/lang"], function(lang){ | |
// module: | |
// dojo/gesture/tap | |
// summary: | |
// This module provides tap gesture event handlers | |
// - dojo.gesture.tap -> to fire 'tap' event | |
// - dojo.gesture.tap.hold -> to fire 'tap.hold' event | |
// - dojo.gesture.tap.doubletap -> to fire 'tap.doubletap' event | |
// example: | |
// A. Used with dojo.connect() |
This file contains hidden or 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 is the module, the implementation, distinct from the specification/interface. */ | |
define([...deps...], function(){ | |
return function(options){ | |
... | |
}; | |
}); |
This file contains hidden or 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 bar = (function(){ // each module factory executed, export assigned to var | |
return {a:3}; | |
})(); | |
var text = {}; | |
text._resource = "contents of file"; | |
var pckg = {};// nested paths -> nested namespace/sub-objects | |
pckg.foo = (function(bar){ |
This file contains hidden or 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
HTTP/1.1 200 OK | |
Content-Type: application/foo+json; # Web applications typically do and should use JSON as the semantic data source | |
# If your mobile device has an app for "application/foo+json", auto-launch app to handle resource | |
Link: <http://foo.com/ui.html>; rel="renderer" # HTML page to use to renderer it | |
Link: <http://foo.com/ui.ipa>; rel="ios.renderer" # Recommended device-specific app for this resource | |
Link: <http://foo.com/schema>; rel="describedby" # schema describing the JSON structure so that search engines can crawl it | |
... |
This file contains hidden or 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 hidden or 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
{ | |
"cars": [ | |
{"make": "Honda", "model": "Accord"}, | |
{"make": "Ford", "model": "Taurus"}, | |
] | |
} |
This file contains hidden or 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
db = new Storage # external implementation | |
Store = (entity) -> | |
find: db.find.bind db, entity | |
get: db.get.bind db, entity | |
save: db.save.bind db, entity | |
add: db.insert.bind db, entity | |
remove: db.remove.bind db, entity | |
update: db.update.bind db, entity | |
patch: db.patch.bind db, entity |
This file contains hidden or 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 currentModule, defaultCompile = module.constructor.prototype._compile; | |
module.constructor.prototype._compile = function(content, filename){ | |
currentModule = this; | |
try{ | |
return defaultCompile.call(this, content, filename); | |
} | |
finally { | |
currentModule = null; | |
} | |
}; |
This file contains hidden or 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
require.def("uses-foo",["has!node:./node/foo,svg:./svg/foo,./default/foo"],function(foo){ | |
foo.bar(); | |
}); |