From: dhrname Date: Wed, 4 Nov 2015 13:56:04 +0000 (+0900) Subject: Ligheten the _getAttr method X-Git-Tag: version22~6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d2b2cf81104ca014538b000acdeb5a2866312540;p=sie%2Fsie.git Ligheten the _getAttr method --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index e2b78ac..00b62fb 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -795,10 +795,13 @@ base("$calcMode").up("$attribute").mix( { nameSpace = "http://www.w3.org/1999/xlink"; } var s = this._ele.getAttributeNS(nameSpace, name); - if (this.element && (s === "inherit")) { - return this.element.ownerDocument.defaultView.getComputedStyle(this.element.parentNode, "").getPropertyValue(this.attrName); - } else if (this.element && (s === "currentColor")) { - return this.element.ownerDocument.defaultView.getComputedStyle(this._ele, "").getPropertyValue("color"); + if (this.element) { + var view = this.element.ownerDocument.defaultView; + if (s === "inherit") { + return view.getComputedStyle(this.element.parentNode, "").getPropertyValue(this.attrName); + } else if (s === "currentColor") { + return view.getComputedStyle(this._ele, "").getPropertyValue("color"); + } } /*DOM Level2やIE11では、getAttributeNSメソッドは空文字を返す。他のブラウザではnullを返すことが多い *