Skip to content

Commit

Permalink
Preserve script load/execution order (#48465)
Browse files Browse the repository at this point in the history
We need to either disable async loading, or defer exection. In IE11,
we're running into an issue where the logout page is executing before
the vendors file.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley authored Oct 17, 2019
1 parent ed9abf0 commit 57d5afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/legacy/ui/ui_render/bootstrap/template.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (window.__kbnStrictCsp__ && window.__kbnCspNotEnforced__) {
function createJavascriptElement(path) {
var dom = document.createElement('script');

dom.setAttribute('async', '');
dom.setAttribute('defer', 'defer');
dom.addEventListener('error', failure);
dom.setAttribute('src', file);
dom.addEventListener('load', next);
Expand Down

0 comments on commit 57d5afb

Please sign in to comment.