Bug Tracker

Modify

Ticket #4683 (closed bug: worksforme)

Opened 4 years ago

Last modified 2 years ago

Callback for getScript is called too early in Safari and Opera

Reported by: inez Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: getScript callback Cc:
Blocking: Blocked by:

Description

var myCallback = function() { ... } $.getScript(myLib, myCallback);

In Safari and Opera myCallback is called too early, before myLib script is downloaded and initialized. Note that this problem may not occur if your network latency is very low or you have myLib in browser cache.

Patch is attached.

Attachments

patch.txt Download (1.6 KB) - added by inez 4 years ago.

Change History

Changed 4 years ago by inez

comment:1 Changed 3 years ago by addyosmani

  • Status changed from new to closed
  • Resolution set to worksforme

This is currently working fine for me with jQuery 1.4.2 and jQuery 1.4.3.

comment:2 Changed 2 years ago by tomasloon@…

I guess this is an issue related to script performance. We can have fixes such as your patch or looping a timeout... But if the computer processing is slow, it is most probably that it will happen. (I mean, if you have an i7 probably won't suffer this)

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.