Skip to content

Commit

Permalink
Do not set crossOrigin for file protocol (#9854)
Browse files Browse the repository at this point in the history
This allows using GWT compiled code with `installCode=false` also with
`file://` protocol.

See
#9734 (comment)
for the relevant Chrome error message.
  • Loading branch information
zbynek authored Oct 20, 2023
1 parent 88bc805 commit abceee4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ function installScript(filename) {
var docbody = doc.body;
var script = doc.createElement('script');
script.language='javascript';
script.crossOrigin='';
if (location.host) {
script.crossOrigin='';
}
script.src = code;
if (__MODULE_FUNC__.__errFn) {
script.onerror = function() {
Expand Down

0 comments on commit abceee4

Please sign in to comment.