Created
May 9, 2012 09:56
-
-
Save maimai-swap/2643466 to your computer and use it in GitHub Desktop.
プロトタイプでclass作るときの自分のメモ
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
// tpsは自分の好きな名前なんでも。ルートのパッケージ名的な。 | |
// geoは機能別に好きな名前なんでも。 | |
if ( typeof(tps) == 'undefined' ) tps = {}; | |
if ( typeof(tps.geo) == 'undefined' ) tps.geo = {}; | |
tps.geo.prototype = { | |
prop01:false, | |
prop02:false, | |
init : function () { | |
this.func01(); | |
}, | |
func01 : function () { | |
console.log("func01"); | |
} | |
} | |
/// USEAGE | |
// var tps_geo = tps.geo.prototype; | |
// tps_geo.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment