-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid procedure call or argument error in IE9 > IE8 Mode #137
Comments
We've seen some issues when other script elements are removed from the page. Could that be happening? Thanks for the info/report! |
Just realized this part of the project is a huge mess. I'll clean it up and try to nail exactly what's causing this along the way, or if the issue is still there after the cleanup. I should be able to make a sandbox test for it if it's still an issue. |
Is it possible that some systems might have "always refresh from server" as default setting in their IE8, and this forces yepnope to actually load scripts twice? Some of our clients are on terminals with pretty high security settings, so I'm worried this might be the reason I get a lot of weird errors. I get errors when 1) Hitting Ctrl + F5 like a maniac (30+ times) and 2) when turning on "Always refresh from cache". And now specifically when loading scripts that uses $.widget in jQuery which I think can break if jQuery (or other scripts) is loaded twice. |
Sorry for the brevity but I'm mobile: The setting would definitely cause dual downloads but it wouldn't cause Are you noticing things run twice? |
By this you mean adding or removing script tags to the DOM? No I dont think that's happening. Can it be because I have multiple instances of Modernizr.load ? I have widget A, B and C, and each installation of this has a Modernizr.load({ ... }); which some times loads the same scripts. I suspect I might be using it wrong :) |
Just saw this issue: #96 (comment) It actually might be what's happening in my case as well. |
I see where the issue is... // Attach handlers for all browsers
preloadElem.onerror = preloadElem.onload = preloadElem.onreadystatechange = function(){
onload.call(this, firstFlag);
}; It gets nulled once onload fires: function onload ( first ) {
.........
// Handle memory leak in IE
preloadElem.onload = preloadElem.onreadystatechange = null; Inside the onload function we run through the scripcache array as: for ( var i in scriptCache[ url ] ) {
if ( scriptCache[ url ].hasOwnProperty( i )) {
scriptCache[ url ][ i ].onload();
}
} In IE, it sees that onload has been nulled, hence scriptCache[ url ][ i ].onload() will raise an exception. |
Hi @YoussefTaghlabi (and all). I'm just getting back from overseas, but that's a good find. Would you consider submitting a pull-request to fix it. /cc @ralphholzmann |
Sure, I'll submit a pull-request by tomorrow. |
Done. |
Fixed in #139 |
I get an error with yepnope - 1.5.4pre when refreshing the page in IE8 (turned off caching to reproduce every time). I'll try to provide as much relevant info as possible, let me know if you need anything else:
My code:
The error:
SCRIPT5: Invalid procedure call or argument
BuiltJS.rails, line 1022 character 15
SCRIPT5: Invalid procedure call or argument
BuiltJS.rails, line 1022 character 15
Here's what I get when hovering the scriptCache:
[-] scriptCache {...} Object
[+] [prototype] {...} Object
[+] /scripts/core/forms.min.js [] Object, (Array)
[+] /scripts/libs/jquery/jquery.validate-1.9.0/jquery.validate.min.js [[object HTMLScriptElement]] Object, (Array)
[+] /scripts/libs/jquery/ui.Wizard.js [] Object, (Array)
/Scripts/polyfills/jquery-placeholder/jquery.placeholder.min.js 2 Number
Will continue debugging this and let you know if I figure out anything..
The text was updated successfully, but these errors were encountered: