Set crossorigin="anonymous" when load plugin js files
This will help provide more meaningful error other than `Script error.` Change-Id: Ie1ae6bb96e5ca61c390f7b125788d1975fcd5823
This commit is contained in:
@@ -359,6 +359,10 @@
|
||||
const el = document.createElement('script');
|
||||
el.defer = true;
|
||||
el.setAttribute('src', url);
|
||||
// no credentials to send when fetch plugin js
|
||||
// and this will help provide more meaningful error than
|
||||
// 'Script error.'
|
||||
el.setAttribute('crossorigin', 'anonymous');
|
||||
el.onerror = onerror;
|
||||
return document.body.appendChild(el);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user