I am currently using fineuploader with ASP.NET webforms and am encountering a problem with strict mode in FireFox. ASP.NET webforms has a javascript file (microsoftajaxwebforms.js) that contains the following code (This is used to postback to the server and call the passed event, ex. Save
below.):
_doPostBack: function(a, k) {
var f = window.event;
if (!f) {
var d = arguments.callee ? arguments.callee.caller : null;
if (d) {
var j = 30;
while (d.arguments.callee.caller && --j) d = d.arguments.callee.caller;
f = j && d.arguments.length ? d.arguments[0] : null
}
}
...
That function is used liberally in the codebase I am working with. I cannot change this code for fear of unintended side-effects in the rest of the product. The problem is with the arguments.callee.caller
. That is what is throwing the error access to strict mode caller function is censored
. I believe the solution is to remove the use strict
from the fineuploader.js, but I am worried about how that might effect fineuploader in other browsers. I am not familiar with strict mode in javascript, so maybe someone can shed some light on the possible side-effects of removing strict mode from the fineuploader.js. For reference, here is the fineuploader function that eventually calls the above code and causes the error.
var fineUploader = $('#jquery-wrapped-fine-uploader').fineUploader({
...
multiple: false,
text: {
uploadButton: 'Click or drag a file to upload.'
},
autoUpload: false,
debug: false,
template: 'fineuploader-template',
...
}
}).bind('complete', function (event, id, name, response) {
if (response['success']) {
cp_hide();
fineUploader.fineUploader('reset');
__doPostBack("Save", "");
}
})...
I can modify anything short of the code referenced from microsoftajaxwebforms.js
if needed. I appreciate any help.