Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.observe("dom:loaded", function() {
- var test = new a;
- });
- /* javascript file #1 */
- var a = (function() {
- var a = Class.create({
- initialize: function() {
- new b(this.future_func);
- },
- do_something: function() {
- console.log('it has been done!');
- },
- do_another_thing: function() {
- console.log('another thing!');
- },
- future_func: function() {
- var my_a = this;
- my_a.do_another_thing();
- var later_func = function() {
- my_a.do_something();
- }
- return later_func;
- }
- });
- return a;
- })();
- /* javascript file #2 */
- var b = (function() {
- var b = Class.create({
- initialize: function(func) {
- func();
- }
- });
- return b;
- })();
Add Comment
Please, Sign In to add comment