OSDN Git Service

オブジェクトにupsvgメソッドを追加して、名前空間を省略
authordhrname <sie-developers@lists.sourceforge.jp>
Wed, 12 Nov 2014 13:22:21 +0000 (22:22 +0900)
committerdhrname <sie-developers@lists.sourceforge.jp>
Wed, 12 Nov 2014 13:22:21 +0000 (22:22 +0900)
org/w3c/dom/svg.js

index ca54bb3..a21f58e 100644 (file)
@@ -133,6 +133,10 @@ NAIBU.eval = function(code) {
  *すべてのSVG関連要素の雛形となるオブジェクト\r
  */\r
 base.$1 = base("$document").$element.up("$svgelement").mix( {\r
+  /*SVGの名前空間をつけて継承オブジェクトを作るため*/\r
+  upsvg: function(name) {\r
+    return this.up("http://www.w3.org/2000/svg" + name);\r
+  },\r
   initialize: function () {\r
     SVGStylable.call(this);             //ElementCSSInlineStyleのインタフェースを継承\r
     /*interface SVGTransformable : SVGLocatable\r
@@ -1184,7 +1188,7 @@ _.createDocument = function() {
 /*$svg\r
  *svg要素をあらわすオブジェクト\r
  */\r
-base("$document").$element.$svgelement.up("http://www.w3.org/2000/svgsvg").on("initialize",  function (_doc) {\r
+base("$document").$element.$svgelement.upsvg("svg").on("initialize",  function (_doc) {\r
   _doc && (this._tar = _doc.createElement("v:group"));\r
   _doc = void 0;\r
   /*_svgload_limitedはSVGLoadイベントを発火させる判定基準。\r