Search code examples
javascriptgoogle-chromeweb-componentcustom-element

CustomElements.js:596Uncaught TypeError: Cannot assign to read only property 'customElements' of object '#<Window>'


We are leveraging skateJS and are using webcomponent.js for polyfills. However, since the new release of Google Chrome (Version 54.0.2840.71) today, our app is throwing a fatal error.

CustomElements.js:596Uncaught TypeError: Cannot assign to read only property 'customElements' of object '#'


Solution

  • Since version 54, Chrome has introduced a new gobal variable named customElements, actually window.customElements, which is part of the Custom Elements v1 specification.

    It must be in conflict whith an identical variable that you use in your own code (guess in file CustomElements.js). You'll need to rename it.