diff --git a/source/Ox.UI/js/Core/Ox.API.js b/source/Ox.UI/js/Core/Ox.API.js index 7ee69967..d5f6017b 100644 --- a/source/Ox.UI/js/Core/Ox.API.js +++ b/source/Ox.UI/js/Core/Ox.API.js @@ -47,7 +47,8 @@ Ox.API = function(options, callback) { Ox.forEach(result.data.actions, function(val, key) { that[key] = function(/*data, age, callback*/) { var data = {}, age = -1, callback = null; - Ox.forEach(arguments, function(argument) { + //Ox.makeArray required for Firefox 3.6 because Ox.isArguments fails + Ox.forEach(Ox.makeArray(arguments), function(argument) { if (Ox.isObject(argument)) { data = argument; } else if (Ox.isNumber(argument)) { diff --git a/source/Ox.js b/source/Ox.js index e7f8ac65..6a0971e4 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -81,13 +81,14 @@ window.Ox = { } function loadScript(script, callback) { - var element = document.createElement('script'); + var element = document.createElement('script'), + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; element.onload = callback; element.src = path + script + '?' + parseInt(Math.random() * 1000000); element.type = 'text/javascript'; - document.head.appendChild(element); + head.appendChild(element); } } -}; \ No newline at end of file +}; diff --git a/source/Ox/js/Request.js b/source/Ox/js/Request.js index 404c6a03..2bb29076 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -68,6 +68,7 @@ Ox.loadFile = (function() { var cache = {}; return function (file, callback) { var element, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement, request, type = file.split('.').pop(), isImage = type != 'css' && type != 'js'; @@ -94,7 +95,7 @@ Ox.loadFile = (function() { element.onload = addFileToCache; } } - document.head.appendChild(element); + head.appendChild(element); } else { addFileToCache(); } @@ -135,4 +136,4 @@ Ox.loadFile = (function() { !error && addFileToCache(); } }; -}()); \ No newline at end of file +}());