builder.html.js
authorAlan Knowles <alan@akbkhome.com>
Sun, 8 Apr 2012 06:50:22 +0000 (14:50 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 8 Apr 2012 06:50:22 +0000 (14:50 +0800)
builder.html.js

index 2de6c95..7d4bece 100644 (file)
@@ -21,12 +21,12 @@ Builder  = {
             this.scriptTag = false;
         }
         
-        this.scriptTag = document.body.appendChild(document.body.createElement('script'));
+        this.scriptTag = document.body.appendChild(document.createElement('script'));
         this.scriptTag.setAttribute('language','text/javascript');
         
         this.id++;
         this.scriptTag.appendChild(
-                    document.body.createCDATA(
+                    document.createCDATASection(
                             'Builder._src_' + this.id + ' =  ' + JSON.stringify(data)
         ));