Skip to content

Commit 12847c6

Browse files
Solonisskamilogorek
authored andcommitted
fix: Apply crossorigin attribute with setAttribute tag (#2196)
The crossorigin attribute is not being applied to the script tag when the assignment `_newScriptTag.crossorigin = 'anonymous'` but using `setAttribute()` applies the attribute correctly.
1 parent b3d0ddc commit 12847c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/browser/src/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
var _currentScriptTag = _document.getElementsByTagName(_script)[0];
6262
var _newScriptTag = _document.createElement(_script);
6363
_newScriptTag.src = _sdkBundleUrl;
64-
_newScriptTag.crossorigin = 'anonymous';
64+
_newScriptTag.setAttribute('crossorigin', 'anonymous');
6565

6666
// Once our SDK is loaded
6767
_newScriptTag.addEventListener('load', function() {

0 commit comments

Comments
 (0)