Skip to content

Commit

Permalink
Don’t wait for window.load if jQuery is loaded after domready
Browse files Browse the repository at this point in the history
See ryankshaw/jquery@3a48a84c for the
Actual changes

If this jQuery code was initialized after the DOMContentLoaded event
But before the window.load event, it would wait until the window.load
Fallback to run everything that was using $.ready() (aka $(fn))

this change make it so it executes all those callbacks now instead
Of waiting for window.load

Test plan:
* turn streaming on
* profile a page
* you should notice that jQuery is initialized as part of main.js
  Sometime after DOMContentLoaded
* but you should see all the callbacks run then instead of after the 
  Window.load event

Change-Id: Ie75f3475f21ac9e7f7503c91e9c5d5700ff28b11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215873
Tested-by: Jenkins
QA-Review: Ryan Shaw <[email protected]>
Product-Review: Ryan Shaw <[email protected]>
Reviewed-by: Clay Diffrient <[email protected]>
  • Loading branch information
ryankshaw committed Nov 7, 2019
1 parent b410eea commit 3f095be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12395,7 +12395,7 @@ [email protected]:

[email protected], jquery@>=1.2.6, jquery@>=1.5, jquery@>=1.7.1, "jquery@https://github.com/ryankshaw/jquery.git#1.7.2-with-AMD-and-CommonJS":
version "1.7.2"
resolved "https://github.com/ryankshaw/jquery.git#1529762158a452fecdeb31b826d3d9c3ff9530dd"
resolved "https://github.com/ryankshaw/jquery.git#3a48a84c713291b790a2556d9ba036ec4d53c52f"

js-base64@^2.1.8, js-base64@^2.1.9, js-base64@^2.4.3:
version "2.5.1"
Expand Down

0 comments on commit 3f095be

Please sign in to comment.