Merge "Set crossorigin="anonymous" when load plugin js files"
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js
index 1359ce8..d44fa17 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js
@@ -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);
     }