많은 Polymer 2.0 요소를 성공적으로 구축했으며 ES6 가능 브라우저에서 뛰어납니다. 당신이와 함께 제공되는 네이티브 심을 필요 모양,Polymer 2.0을 얻는 방법 v1 스펙으로 작업하는 ES5 요소?
Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
몇 가지 조사 후 :
내가 ES5로 transpile하려고하면 브라우저는 이런 오류의 무리를 던졌습니다 webcomponentsjs-ES5 로더,하지만 지금은지고있어 새로운 오류로 전환 후 :
Class constructor DomModule cannot be invoked without 'new'
어떻게 transpiled 않는 폴리머 2.0 요소는 ES5 브라우저에 익숙해? 내가 놓친 게 있니?
이 솔루션을 테스트 했습니까? http://stackoverflow.com/a/41415441/4600982 또는 https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs? – Supersharp
@Supersharp 두 번째 링크는 훌륭하게 작동했습니다! 고마워요. – joncarlson
http://stackoverflow.com/q/42845582/4600982의 가능한 복제본입니다. – Supersharp