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
/* 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
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
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
# My Cool Package | |
Here is little introduction. | |
## module-a | |
A little intro to this module. here are the methods/props: | |
<pull-in-from-api-docs> <!-- get stuff from code --> | |
<example for="myMethod1"> |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Dual Boot Test</title> | |
<style type="text/css"> | |
</style> | |
<script type="text/javascript" src="/dev/dojo-release-1.3.3-src/dojo/dojo.js"></script> | |
<script> | |
console.log("dojo 1.3", dojo); |
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
.segment { | |
width: 33%; | |
float: left; | |
}; | |
.inside { | |
margin: 20px; | |
} | |
input { | |
width: 100%; | |
} |
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
Dylan was asking me about the own()'ing of aspects, so I thought I would try to write out the issues in case it would help. The issue associated with not own()ing the function (https://github.com/dojo/dijit/blob/1.9.1/_WidgetBase.js#L940), is that if a reference to the widget or the handle is retained after destruction, the function is still referenced just as it was when it was live. What has made this a debatable issue though, is that if a widget is referenced after it is destroyed, is that really a valid use case? Is leaving such a reference itself a memory leak, and should be fixed, rather than trying to make memory leaks be smaller leaks? The downside of own()ing all aspect handles is that own()ing has a cost itself, each owned reference takes up a slot in an array, so by own()ing aspects, we are effectively punishing the vast majority of widgets do not ever end up with a reference to a destroyed widget. | |
It might help to look at a few different scenarios: | |
A single widget: when a widget listens/aspects t |
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
> foo = new Model(); | |
> foo.bar = {baz:3} | |
> foo.property('bar').property('baz').observe(function(value){console.log('baz new value', value);}); | |
> foo.set('bar', {baz:5}); | |
baz new value 5 VM6359:2 |
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
import { mixin, declareFrom, after } from 'core/traits' or 'core/compose' | |
class Request { | |
get() { } | |
} | |
class Cache { | |
@after /* add something to the method so that mixin knows that it should run after the method it is overriding? */ | |
get() { | |
} | |
invalidate() { } |