Preserve script load/execution order (#48465) (#48593)

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>
This commit is contained in:
Tyler Smalley 2019-10-17 16:52:41 -07:00 committed by GitHub
parent 6672cf3054
commit 077336ca0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);