From 7f2909e0cc7c5541093a313c73ef6b20d9f7bf77 Mon Sep 17 00:00:00 2001 From: dhrname Date: Wed, 4 Feb 2015 22:53:21 +0900 Subject: [PATCH] Add an eventTarget property of the object --- org/w3c/dom/smil.js | 5 +++++ tool/Spec/spec/SvgDomSpec.js | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 8362ce0..5bc1957 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -197,6 +197,9 @@ base("$frame").mix ( { /*イベントやindefinteで未解決かどうか*/ isResolved: false, + + /*イベントが適用される要素*/ + eventTarget: document.documentElement, /*trim メソッド * 文字列中の空白を除去*/ @@ -272,6 +275,8 @@ base("$frame").mix ( { /*イベントもindefiniteもないので、解決済みと考える*/ this.isResolved = true; } + if (event) { + } return this; } } ); diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index b754ffc..b0cc823 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2119,6 +2119,7 @@ describe("SMIL Animation Spec", function() { it("should be this for the value (limit value analysis)", function() { expect(begin.string).toBe(""); expect(begin.isResolved).toBeFalsy(); + expect(begin.eventTarget).toBe(document.documentElement); } ); /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ it("should be this for the value (the valid partion)", function() { @@ -2368,15 +2369,15 @@ describe("SMIL Animation Spec", function() { begin.string = "click-0ms"; expect(begin.parse().begin).toEqual(0); - begin.string="click+0"; + begin.string="id.click+0"; expect(begin.parse().begin).toEqual(0); - begin.string = "click+1"; + begin.string = "id.click+1"; expect(begin.parse().begin).toEqual(1000); - begin.string = " click "; + begin.string = " id . click "; expect(begin.parse().begin).toEqual(0); - begin.string = "click+0ms"; + begin.string = "id.click+0ms"; expect(begin.parse().begin).toEqual(0); - begin.string = "click-0ms"; + begin.string = "id.click-0ms"; expect(begin.parse().begin).toEqual(0); } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ -- 2.11.0