簡體   English   中英

Polymer 2.0 Edge問題

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM