on ‎2019 May 20 3:52 PM
When using the minifier in javascript.tag, in a storefront with the smartedit extension added, the app fails in IE11
<c:choose>
<c:when test="${wro4jEnabled}">
<script type="text/javascript" src="${fn:escapeXml(contextPath)}/wro/all_responsive.js"></script>
<script type="text/javascript" src="${fn:escapeXml(contextPath)}/wro/addons_responsive.js"></script>
</c:when>
the webApplicationInjector.js gets minified too, and loading it fails in IE. This code in webApplicationInjector:
return t.getWebappScriptElementFromDocument = function (e) {
if (e.currentScript) {
if (!(e.currentScript instanceof HTMLScriptElement))
throw new Error("getWebappScriptElementFromDocument() found non htlm script element");
return e.currentScript
}
var n = e.querySelector("script#" + t.webappScriptId);
if (n)
return n;
var r = e.querySelectorAll("script[src*=" + t.webappScriptName + "]");
if (1 !== r.length)
throw new Error("SmartEdit unable to load - invalid " + t.webappScriptName + " script tag");
return r.item(0)
},
as e.currentScript is not supported in IE 11 it tries to fetch:
var n = e.querySelector("script#" + t.webappScriptId);
if (n)
return n;
var r = e.querySelectorAll("script[src*=" + t.webappScriptName + "]");
//where
t.webappScriptId = "smartedit-injector",
t.webappScriptName = "webApplicationInjector",
But the script with id/name cannot be found in the src of the document, as it uses the minified version.
Any suggestions?
Request clarification before answering.
Hi ioana.diaconu,
Did you find a resolution for this defect?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.