fgnass / domino

Server-side DOM implementation based on Mozilla's dom.js
BSD 2-Clause "Simplified" License
768 stars 120 forks source link

IE11 support break in version 2.1 #133

Closed alaingiller closed 5 years ago

alaingiller commented 5 years ago

@Angular/platform-server version 7+ use domino 2.1+ which break IE11 support. I need platform-server on UI-side because of caching.

The problem: NodeList.js contains the following code:

var NodeList;
try {
    // Attempt to use ES6-style Array subclass if possible.
    NodeList = require('./NodeList.es6.js');
} catch (e) {
    // No support for subclassing array, return an actual Array object.
    NodeList = require('./NodeList.es5.js');
}

module.exports = NodeList;

And on build node will surely support es6 and never go in catch clause. So in final bundle there will be the es6 version with the keyword class which cannot be fixed with any polyfill.

Workaround:

cscott commented 5 years ago

This seems like an angular bug, or a bug in how you are packaging domino for the web. This doesn't really seem like a bug in domino, which is after all "DOM In NOde".

Can you refile this bug against a more appropriate package? Obviously I can't merge that workaround postinstall script.

CaerusKaru commented 5 years ago

@alaingiller This belongs in this repository, please file an issue there with a minimal reproduction repository that we can investigate.

alaingiller commented 5 years ago

The root problem is in fact in ngx-cache: @ngx-cache/platform-browser depend on @angular/platform-server. I open a bug there: https://github.com/fulls1z3/ngx-cache/issues/113

CaerusKaru commented 5 years ago

@cscott This can be closed