document.currentScript doesn't contain as attribute while inferring module ID:
function _inferModuleId() {
var script = document.currentScript;
if (script.hasAttribute('as')) { // Always `false`in Firefox and Safari
return script.getAttribute('as');
}
//...
Here is a small demo app. The problem is reproducible only within HTML Imports. According to the polyfill docsdocument._currentScript should be used within the browsers without native HTML Imports support. Looks like it fixes the problem, please see README.md of the demo app.
document.currentScript
doesn't containas
attribute while inferring module ID: