[英]Polymer 2.0 Edge Issue
使用Polymer 2.0,我编写了一个应用程序,其入口点是CMS中的页面。 该页面将加载polyfills,导入应用程序的入口点,然后将自定义元素放入页面中。 此过程在Chrome和Firefox中运行良好; 但是,在Edge中存在问题。 我在JavaScript控制台中收到这样的错误:
Object doesn't support property or method 'PropertyEffects'
Unable to get property '__mixinSet' of undefined or null reference
Function is not a constructor
该应用程序正在使用常规的未构建源代码。 如何解释或解决这些错误?
您使用哪个版本的Edge?
来自聚合物服务源的注释( https://github.com/Polymer/polyserve/blob/master/src/compile-middleware.ts#L150 )
// Note: The Edge user agent uses the EdgeHTML version, not the main
// release version (e.g. EdgeHTML 15 corresponds to Edge 40). See
// https://en.wikipedia.org/wiki/Microsoft_Edge#Release_history.
//
// Versions before 15.15063 may contain a JIT bug affecting ES6
// constructors (see #161).
因此,对于直到此版本的Edge,您仍然需要提供备用ES5版本。
如果您使用的是polymer serve
则可以根据需要将ES6即时转换为ES5。
对于其他所有内容,您都应该使用polymer build
来提供ES5代码。 然后根据需要为您服务。 (通过用户代理字符串在服务器上检查)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.