[Sie-announce] SIEコード [1121] src属性の設定でsetAttributeの使用を避けた

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 8日 (水) 22:11:38 JST


Revision: 1121
          http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1121
Author:   dhrname
Date:     2009-04-08 22:11:38 +0900 (Wed, 08 Apr 2009)

Log Message:
-----------
src属性の設定でsetAttributeの使用を避けた

Modified Paths:
--------------
    branches/04x/046/sie.js

Modified: branches/04x/046/sie.js
===================================================================
--- branches/04x/046/sie.js	2009-04-05 13:04:17 UTC (rev 1120)
+++ branches/04x/046/sie.js	2009-04-08 13:11:38 UTC (rev 1121)
@@ -763,6 +763,7 @@
   try {
     var ele = this.tar;
     ele.path = dat;
+    ele.style.width = w+ "px"; ele.style.height = h +"px";
     ele.coordsize = w + " " + h;
     this.paint.set(w, h, ttm);
   } catch(e) {stlog.add(e,479);}
@@ -795,6 +796,7 @@
   try {
     var ele = this.tar;
     ele.path = dat;
+    ele.style.width = w+ "px"; ele.style.height = h +"px";
     ele.coordsize = w + " " + h;
     this.paint.set(w, h, ttm);
   } catch(e) {stlog.add(e,519);}
@@ -1792,11 +1794,10 @@
     if (this.href.indexOf(".") === 0) { //相対URIの場合
       uri = this.href;
     }
-    var attr = "href";
     switch (this.show) {
       case "embed":
         if (this.tar.tagName === "image") {
-          attr = "src";
+          this.tar.src = uri;
         }  else{
           uri.match(/#(.+)$/);
           this.resource = document.getElementById(RegExp.$1);
@@ -1810,7 +1811,7 @@
       default:
       break;
     }
-    this.tar.setAttribute(attr,uri);
+    this.tar.setAttribute("href",uri);
   }
   } catch(e) {stlog.add(e,17155);}
 }




Sie-announce メーリングリストの案内
Back to archive index