Skip to content

Commit

Permalink
fix: [importScript] add crossorigin to script tag
Browse files Browse the repository at this point in the history
  • Loading branch information
akai committed Apr 8, 2021
1 parent bab628a commit 935d074
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/importScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export function importScript(url: string, name: string) {
return new Promise((resolve, reject) => {
const script = document.createElement('script');
script.async = true;
script.crossOrigin = 'anonymous';

const destroy = () => {
if (script.parentNode) {
Expand Down

0 comments on commit 935d074

Please sign in to comment.