svnno****@sourc*****
svnno****@sourc*****
2011年 10月 20日 (木) 19:57:47 JST
Revision: 3011
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=3011
Author: dhrname
Date: 2011-10-20 19:57:47 +0900 (Thu, 20 Oct 2011)
Log Message:
-----------
IE9でscript要素を使ったときのエラーに対処した
Modified Paths:
--------------
branches/08x/087/org/w3c/dom/svg.js
Modified: branches/08x/087/org/w3c/dom/svg.js
===================================================================
--- branches/08x/087/org/w3c/dom/svg.js 2011-10-19 13:52:44 UTC (rev 3010)
+++ branches/08x/087/org/w3c/dom/svg.js 2011-10-20 10:57:47 UTC (rev 3011)
@@ -4938,7 +4938,12 @@
NAIBU._temp_doc = tod;
script = script.replace(/function\s+(\w+)/g, "$1 = function");
script = "(function(document){" +script+ "})(NAIBU._temp_doc);"
- eval(script);
+ try {
+ eval(script);
+ } catch (e) { //IE9では、documentがconstとして定数指定されているため、引数として指定できない
+ script = script.replace(/function\(document\){/, "function() {");
+ eval(script);
+ }
tar = evt = script = void 0;
}, false);
this.addEventListener("DOMNodeInserted", function(evt){