OSDN Git Service

timingローカル関数の変数について整理
authordhrname <dhrname@users.sourceforge.jp>
Wed, 4 Jan 2012 12:56:00 +0000 (21:56 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Wed, 4 Jan 2012 12:56:00 +0000 (21:56 +0900)
org/w3c/dom/svg.js

index 1bb450b..9bd8db5 100644 (file)
@@ -5316,12 +5316,13 @@ SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
         var ds = function (evt) {
              that[name](offset);
             };
-        if (id && val.match(new RegExp(id+"\.([a-zA-Z]+)"))) {
+        if (id && val.match(/\.([a-z]+)/i)) {
           that.ownerDocument.getElementById(id).addEventListener(RegExp.$1, ds);
         } else if (val){
           that.targetElement.addEventListener(val.match(/^[a-z]+/i)[0], ds)
         }
       }
+      val = searchId = id = void 0;
     };
     timing((this._beginValue || "0ms"), "beginElementAt", _begin);
     if (this._endValue) {