Created
December 3, 2013 12:40
-
-
Save dameleon/7768543 to your computer and use it in GitHub Desktop.
This file contains 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 SomeClassOne() { | |
this.someClassTwoInstance = new SomeClassTwo(this); | |
} | |
SomeClassOne.prototype = { | |
foo: foo, | |
bar: bar, | |
}; | |
function foo() { | |
} | |
function bar() { | |
return baz(this.someClassTwoInstance); | |
} | |
function hoge() { | |
} | |
function baz(someClassTwoInstance) { | |
return someClassTwoInstance.hoge(); | |
} | |
function fuga() { | |
} | |
function SomeClassTwo(context) { | |
this.context = context; | |
} | |
SomeClassTwo.prototype = { | |
hoge: hoge, | |
fuga: fuga | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment