Side navigation
#12353 closed bug (invalid)
Opened August 20, 2012 07:23PM UTC
Closed September 08, 2012 03:29PM UTC
Last modified September 09, 2012 06:28PM UTC
deferred.done demo does not work on IE8
Reported by: | mwmorris@crutchfield.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.0 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
Go to deferred.done page on jQuery site. The Demo does not work. Get error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322; MS-RTC LM 8)
Timestamp: Mon, 20 Aug 2012 19:19:09 UTC
Message: Expected 'catch'
Line: 7
Char: 25
Code: 0
Attachments (0)
Change History (5)
Changed August 20, 2012 11:36PM UTC by comment:1
cc: | → jaubourg |
---|
Changed August 21, 2012 08:18AM UTC by comment:2
That's because IE8 is showing the wrong "deferred.done" file:
<!DOCTYPE html><html><head> <script src="http://code.jquery.com/jquery-latest.js"></script> <style>html,body{border:0; margin:0; padding:0;}</style></head><body> <button>Go</button> <p>Ready...</p><script>window.onload = (function(){ try{ // 3 functions to call when the Deferred object is resolvedfunction fn1() { $("p").append(" 1 ");}function fn2() { $("p").append(" 2 ");} function fn3(n) { $("p").append(n + " 3 " + n);}// create a deferred object var dfd = $.Deferred();// add handlers to be called when dfd is resolveddfd // .done() can take any number of functions or arrays of functions .done( [fn1, fn2], fn3, [fn2, fn1] )// we can chain done methods, too .done(function(n) { $("p").append(n + " we're done.");}); // resolve the Deferred object when the button is clicked $("button").bind("click", function() { dfd.resolve("and");}); }catch(e){}});</script> </body></html>
Line 7, Character 25, is the end of a try which is there but the catch clause is added at the end of the script:
[[Image(http://i49.tinypic.com/53tdog.png)]]
Honestly dunno what's going on here but it looks like automated code wrapping gone wrong: notice how fn1 just disapeared in the process.
Here if the original code for comparison:
// 3 functions to call when the Deferred object is resolved function fn1() { $("p").append(" 1 "); } function fn2() { $("p").append(" 2 "); } function fn3(n) { $("p").append(n + " 3 " + n); } // create a deferred object var dfd = $.Deferred(); // add handlers to be called when dfd is resolved dfd // .done() can take any number of functions or arrays of functions .done( [fn1, fn2], fn3, [fn2, fn1] ) // we can chain done methods, too .done(function(n) { $("p").append(n + " we're done."); }); // resolve the Deferred object when the button is clicked $("button").bind("click", function() { dfd.resolve("and"); });
Who can fix this one? As in, who has access? Addy?
Changed September 07, 2012 01:21AM UTC by comment:3
Shouldn't we be filing this on the api.jquery.com github tracker?
Changed September 08, 2012 03:29PM UTC by comment:4
resolution: | → invalid |
---|---|
status: | new → closed |
Thanks for reporting this issue! It's been ported to here: https://github.com/jquery/api.jquery.com/issues/63 I'm only closing it as "invalid", as we have no other resolution currently to indicate it was ported.
Changed September 09, 2012 06:28PM UTC by comment:5
This is fixed now. I changed the double-slash comments in the demo code to slash-star comments.
Whoa, that one doesn't make much sense to me. @jaubourg do you know what is going on? The error is showing this line:
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://api.jquery.com/wp-includes/wlwmanifest.xml" />