Created
July 9, 2017 13:19
-
-
Save goofmint/cae47f4105a9afd54226fe5a8b926c3c 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
var HelloClass = h5.cls.RootClass.extend(function (super_) { | |
var id = 0; | |
return { | |
// クラス名(完全修飾名) | |
name: 'HelloClass', | |
// クラスのフィールド定義 | |
field: { | |
_id: null | |
}, | |
accessor: { | |
id: { | |
get: function() { | |
return id; | |
}, | |
set: function(i) { | |
id = i; | |
} | |
} | |
}, | |
// クラスのメソッド定義 | |
method: { | |
constructor: function (params) { | |
// 親クラスのコンストラクタ呼び出し | |
super_.constructor.call(this); | |
id++; | |
} | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment