--- src/scriptaculous.js Tue Dec 13 13:43:20 2005
+++ ../../scriptaculous.js Wed Dec 21 00:35:32 2005
@@ -23,7 +23,16 @@
Version: '1.5.0',
require: function(libraryName) {
// inserting via DOM fails in Safari 2.0, so brute force approach
- document.write('');
+
+ /* document.contentType only exists in Mozilla (Opera doesn't have it) */
+ if (document.contentType == "application/xhtml+xml") {
+ s = document.createElement("script")
+ s.type = "text/javascript";
+ s.src = libraryName;
+ document.body.appendChild(s);
+ } else {
+ document.write('');
+ }
},
load: function() {
if((typeof Prototype=='undefined') ||
@@ -34,15 +43,16 @@
for(var i=0;i