Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
fixed: OC: IE 11 and Edge Legacy - can't load external data(add polyf…
Browse files Browse the repository at this point in the history
…ill for CSS.escape)
  • Loading branch information
theywa committed Jan 13, 2021
1 parent 7280826 commit 8684fcb
Show file tree
Hide file tree
Showing 4 changed files with 2,201 additions and 2,194 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ module.exports = grunt => {
'polyfill-ie11': {
command: [
'mkdir -p public/js/build && curl "https://polyfill.io/v3/polyfill.min.js?ua=ie%2F11.0.0&features=es2015%2Ces2016%2Ces2017%2Ces2018%2Cdefault-3.6%2Cfetch%2CNodeList.prototype.forEach" -o "public/js/build/ie11-polyfill.min.js"',
'cp -f node_modules/enketo-core/src/js/obscure-ie11-polyfills.js public/js/build/obscure-ie11-polyfills.js'
'cp -f node_modules/enketo-core/src/js/obscure-ie11-polyfills.js public/js/build/obscure-ie11-polyfills.js',
'cp -f node_modules/css.escape/css.escape.js public/js/build/css.escape.js'
].join( '&&' )
},
'clean-css': {
Expand Down
4 changes: 4 additions & 0 deletions app/views/surveys/webform.pug
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ block script
obscureIe11PolyfillScript.type = 'text/javascript';
obscureIe11PolyfillScript.src = mainScriptSrc.split('/js/build/')[0] + '/js/build/obscure-ie11-polyfills.js';
document.body.appendChild( obscureIe11PolyfillScript );
var cssEscapeScript = document.createElement( 'script' );
cssEscapeScript.type = 'text/javascript';
cssEscapeScript.src = mainScriptSrc.split('/js/build/')[0] + '/js/build/css.escape.js';
document.body.appendChild( cssEscapeScript );
var script = document.createElement( 'script' );
script.type = 'text/javascript';
script.src = mainScriptSrc.replace('-bundle.', '-ie11-bundle.');
Expand Down
Loading

0 comments on commit 8684fcb

Please sign in to comment.