summaryrefslogtreecommitdiff
path: root/dist/serpentity.js
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2014-08-12 19:25:52 -0500
committerBen Beltran <ben@nsovocal.com>2014-08-12 19:25:52 -0500
commit60a6915a0b24975e28a02b28e43d34f6dbb15625 (patch)
treeccf114757150425e9ab3e4587f09cd1795567d27 /dist/serpentity.js
parenta2949b6a6621627d0382fd1702d067b7b82322ed (diff)
Components extend without having to define initv0.1.6
Diffstat (limited to 'dist/serpentity.js')
-rw-r--r--dist/serpentity.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/dist/serpentity.js b/dist/serpentity.js
index 2f91c25..3522b06 100644
--- a/dist/serpentity.js
+++ b/dist/serpentity.js
@@ -472,7 +472,19 @@ Class(Serpentity, "NodeCollection")({
* components can be any class whatsoever.
*/
Class(Serpentity, "Component")({
+ prototype : {
+ init : function init(config) {
+ var property;
+ config = config || {};
+
+ for (property in config) {
+ if (config.hasOwnProperty(property)) {
+ this[property] = config[property];
+ }
+ }
+ }
+ }
});
/*