Callback Ready of Polymer stops the loading of my Component

137 views Asked by At

Im creating my Polymer App and I need to use the Ready callback to initiate some events and stuff. The problem is that if I add the following code:

ready() {
  console.log("App is ready!");
}

the app doesnt load correctly, it stops before loading completely. For example: I use some kind of canvas and they are not created if I add the function. Last thing in the console is the log of the function ready "App is ready!".

1

There are 1 answers

0
Ofisora On BEST ANSWER

You forgot to call

super.ready()

method. You must call the superclass method. This is required so Polymer can hook into the element's lifecycle.

Example:

ready() {
  super.ready();
  // …
}