You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Project is not working if you download the zip and start server. There are couple of js errors in the console. Please update the attached zip in the codelab.
Error description:
main.js:149 Uncaught TypeError: Failed to execute 'define' on 'CustomElementRegistry': The callback provided as parameter 2 is not a function. at main.js:149and main.js:74 Uncaught TypeError: note.setMessage is not a function
at StickyNotesApp.displayNote (main.js:74)
at new StickyNotesApp (main.js:34)
at main.js:88
The text was updated successfully, but these errors were encountered:
The previous commit for ES6 version (b72c713) worked since it uses the class syntax which fits the syntax of customElement.define
I found the following issue WICG/webcomponents#587 talks about the changes customElement.define. The solution to support the non class syntax was to use Reflect.construct. I have forked this repository and actually made the code use Reflect.construct. It is working on Google Chrome | 76.0.3809.100 (Official Build) (64-bit)
Disclaimer I got it to work but I am not sure if this is production grade code since Web Components are new to me and I am still learning about this as well
Project is not working if you download the zip and start server. There are couple of js errors in the console. Please update the attached zip in the codelab.
Error description:
main.js:149 Uncaught TypeError: Failed to execute 'define' on 'CustomElementRegistry': The callback provided as parameter 2 is not a function. at main.js:149and main.js:74 Uncaught TypeError: note.setMessage is not a function
at StickyNotesApp.displayNote (main.js:74)
at new StickyNotesApp (main.js:34)
at main.js:88
The text was updated successfully, but these errors were encountered: