Bug 84884

Summary: [Safari] jQuery's getJSON fails when the script element that loaded jquery.js is removed from document
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: abarth, adele, ap, ggaren, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://www.facebook.com/cognitom/posts/319792518094577
Attachments:
Description Flags
demo none

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!