Created
January 24, 2012 15:24
-
-
Save neonstalwart/1670675 to your computer and use it in GitHub Desktop.
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
$ 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(); | |
}); | |
}); |
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(['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