OSDN Git Service

begin属性などで使われるイベント処理でバグがあったので修正
authordhrname <dhrname@users.sourceforge.jp>
Wed, 4 Jan 2012 12:43:27 +0000 (21:43 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Wed, 4 Jan 2012 12:43:27 +0000 (21:43 +0900)
org/w3c/dom/svg.js

index ed47b7b..3dbe0aa 100644 (file)
@@ -5317,8 +5317,8 @@ SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
             };
         if (id && val.match(new RegExp(id+"\.([a-zA-Z]+)"))) {
           that.ownerDocument.getElementById(id).addEventListener(RegExp.$1, ds);
-        } else {
-          that.targetElement.addEventListener(val.match(/^[a-z]+/i), ds)
+        } else if (val){
+          that.targetElement.addEventListener(val.match(/^[a-z]+/i)[0], ds)
         }
       }
     };