[Sie-announce] SIEコード [1613]

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 1月 31日 (日) 22:06:14 JST


Revision: 1613
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1613
Author:   dhrname
Date:     2010-01-31 22:06:14 +0900 (Sun, 31 Jan 2010)

Log Message:
-----------


Modified Paths:
--------------
    branches/DOM/org/w3c/dom/events.js

Modified: branches/DOM/org/w3c/dom/events.js
===================================================================
--- branches/DOM/org/w3c/dom/events.js	2010-01-31 12:46:26 UTC (rev 1612)
+++ branches/DOM/org/w3c/dom/events.js	2010-01-31 13:06:14 UTC (rev 1613)
@@ -112,6 +112,13 @@
   if (this === evt.target) {
     evt.eventPhase = Event.AT_TARGET;
   }
+  var tce = this._capter;
+  evt.currentTarget = this;
+  for (var i=0,tcli=tce.length;i<tcli;i++){
+    if (tce[i]) {
+      tce[i].handleEvent(evt);
+    }
+  }
   if (evt.eventPhase === Event.CAPTURING_PHASE) {
     var cte = this.lastChild;
     while(cte) {
@@ -123,25 +130,19 @@
       }
     }
   } else {
-    var tce = this._capter;
-    for (var i=0,tcli=tce.length;i<tcli;i++){
-      if (tce[i]) {
-        tce[i].handleEvent(evt);
-      }
-    }
     if (this.parentNode) {
       this.parentNode.dispatchEvent(evt);
     }
   }
 };
 Document.prototype.dispatchEvent = function( /*Event*/ evt) {
+  this._arr = [];
   this.docuemntElement.dispatch(evt);
   var tarr = this._arr;
   for (var i=0,tarri=tarr.length;i<tarr;++i) {
     tarr[i].set(this.w,this.h);
   }
   this._arr = null;
-  this._arr = [];
   evt = null;
 };
 




Sie-announce メーリングリストの案内
Back to archive index