From cf83f15c58e198063ab0d3ee907f939838a19fce Mon Sep 17 00:00:00 2001 From: dhrname Date: Sun, 15 Jun 2014 22:08:23 +0900 Subject: [PATCH] =?utf8?q?base.obj=E3=81=AB=E3=83=A1=E3=82=BD=E3=83=83?= =?utf8?q?=E3=83=89=E3=82=92=E5=AE=9A=E7=BE=A9=E3=81=97=E3=81=A6=E3=80=81?= =?utf8?q?=E9=AB=98=E9=80=9F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- tool/funcproto/base.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tool/funcproto/base.js b/tool/funcproto/base.js index 721d8b7..ba78f41 100644 --- a/tool/funcproto/base.js +++ b/tool/funcproto/base.js @@ -15,8 +15,6 @@ function base(name) { F.prototype = this.__id_ ? this : base.obj; s = new F(); /*最適化のため、以下のように、直接指定する*/ - s.mix = this.mix; - s.on = this.on; s.up = base; /*__id_プロパティはupメソッドで呼ばれたかどうか判別するため*/ s.__id_ = name; @@ -32,7 +30,6 @@ this.__id_ = null; /*base.Fはbase関数で使うコンストラクタ関数*/ base.F = function() {}; -base.obj = {}; (function(){ /*mixメソッドで使うNGハッシュを作成*/ @@ -45,7 +42,9 @@ base.obj = {}; base.__ng_ = hash; })(); -this.mix = function(obj) { +/*base.objはbase関数やupメソッドで呼び出されるオブジェクトの始祖となるオブジェクト*/ +base.obj = { + mix: function(obj) { if (!arguments[0]) { throw new Error("No arguments error"); } @@ -64,9 +63,9 @@ this.mix = function(obj) { obj.call(this, this); } return this; -}; + }, -this.on = function(name, func) { + on: function(name, func) { if (!arguments[0]) { throw new Error("No arguments error"); } else if (typeof arguments[1] !== "function") { @@ -126,4 +125,5 @@ this.on = function(name, func) { }); tev = tn = func= void 0; return this; -}; \ No newline at end of file + } +} \ No newline at end of file -- 2.11.0