Bug 84884 - [Safari] jQuery's getJSON fails when the script element that loaded jquery.js is removed from document
Summary: [Safari] jQuery's getJSON fails when the script element that loaded jquery.js...
Status: RESOLVED DUPLICATE of bug 76083
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://www.facebook.com/cognitom/pos...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-25 12:38 PDT by Ryosuke Niwa
Modified: 2012-04-25 15:17 PDT (History)
5 users (show)

See Also:


Attachments
demo (390 bytes, text/html)
2012-04-25 12:38 PDT, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2012-04-25 12:38:03 PDT
Created attachment 138857 [details]
demo

Reduction:
1. Save the attached document locally.
2. Open it.

Expected result:
Alerts 'PASS'

Actual result:
No alerts
Comment 1 Ryosuke Niwa 2012-04-25 12:40:39 PDT
The script works as intended if the script element is not removed.

This was reported on facebook by a Japanese developer. He says the problem doesn't reproduce on Chrome.
Comment 2 Alexey Proskuryakov 2012-04-25 14:58:08 PDT
This looks like correct behavior to me - the script element is removed before the script loads, so it never has a chance to execute.
Comment 3 Ryosuke Niwa 2012-04-25 15:01:43 PDT
(In reply to comment #2)
> This looks like correct behavior to me - the script element is removed before the script loads, so it never has a chance to execute.

The script is supposed to be loaded since it doesn't have differ or aync content attributes on them.
Comment 4 Alexey Proskuryakov 2012-04-25 15:15:27 PDT
Indeed, this is a valid test case. This has been fixed already, which is why this passes in Chrome.

*** This bug has been marked as a duplicate of bug 76083 ***
Comment 5 Ryosuke Niwa 2012-04-25 15:17:18 PDT
(In reply to comment #4)
> Indeed, this is a valid test case. This has been fixed already, which is why this passes in Chrome.
> 
> *** This bug has been marked as a duplicate of bug 76083 ***

Ah, great!