Skip to content

Instantly share code, notes, and snippets.

@neonstalwart
Created January 24, 2012 15:24
Show Gist options
  • Save neonstalwart/1670675 to your computer and use it in GitHub Desktop.
Save neonstalwart/1670675 to your computer and use it in GitHub Desktop.
$ java -jar shrinksafe.jar test.js
define(["dojo/_base/declare","dojo/domReady"],function(_1,_2){
var _3,_4="",_5=function(_6){
_3.innerHTML=(_4+=_6+"<br>");
},A=_1(null,{go:function(){
_5("A");
}}),B=_1([A],{go:function longerName(){
this.inherited(_7,arguments);
_5("B");
}});
_2(function(){
_3=document.getElementById("output");
_5("starting...");
_5("should see \"A B\"");
var it=new B();
it.go();
});
});
define(['dojo/_base/declare', 'dojo/domReady'], function (declare, domReady) {
var output, buffer = '',
log = function (msg) {
output.innerHTML = (buffer += msg + '<br>');
},
A = declare(null, {
go: function () {
log('A');
}
}),
B = declare([A], {
go: function longerName() {
this.inherited(longerName, arguments);
log('B');
}
});
domReady(function () {
output = document.getElementById('output');
log('starting...');
log('should see "A B"');
var it = new B();
it.go();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment