using attached instead of ready did the trick. Thanks for taking the time to figure this out!
Now, the next challenge is to figure a way to declare all this in Elm and automate as much as possible the process of creating the custom components. :) On Tue, Oct 11, 2016 at 12:31 AM, 'Rupert Smith' via Elm Discuss < [email protected]> wrote: > On Monday, October 10, 2016 at 3:38:13 PM UTC+1, Peter Damoc wrote: >> >> I have already tried doing this but have run into troubles: >> >> Here is the topic where I have the code and the problem: >> https://groups.google.com/forum/#!topic/elm-discuss/QI6G6Pd5jPU >> > > I think you just didn't get the lifecycle quite right: > > https://www.polymer-project.org/1.0/docs/devguide/registering-elements > > I moved the embedding of the elm component to the 'attached' method > instead. It seems that attribute values are not set on the properties until > attached, and only have the default values when 'ready' is called. > > Needs some tidying up (tomorrow), but what I have checked in seems to be > working: > > https://github.com/rupertlssmith/elm-polymer/blob/master/counter-elm- > webcomponent/elm-counter.html > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
