On Fri, Mar 4, 2016 at 3:43 AM, <[email protected]> wrote:
>
> Hi, so you think that if moved to 1.0 and ofcourse not use
> iron-flex-layout at least some period there would be no problems like this
> :)
> I tried to migrate some of the logic last days from .5 to 1.0, and I was
> surprised that the normal dynamic creation of elements is not working for
> 1.0. exp:
> var g = dom.createElement("paper-radio-group");
> g.appendChild(dom.createElement("paper-radio-button"));
> the group element was holding the radio button but when clicked it was
> removed from the dom...
> Is 1.0 not supporting dynamic creation/usage of elements?
> Any idea on this one?
>
By default Polymer 1.0 does not use the full Shadow DOM polyfill, so most
DOM operations need to go through a special "Shady DOM" API so that Polymer
knows to re-compute the composed DOM when the document changes. These APIs
are available by calling Polymer.dom() on the element you wish to modify,
in your example:
Polymer.dom(g).appendChild(document.createElement('paper-radio-button'))
See these docs for more:
https://www.polymer-project.org/1.0/docs/devguide/local-dom.html#dom-api
Hope that helps!
Justin
>
> Tnx
> Blaze
>
>
> On Thursday, March 3, 2016 at 8:22:37 PM UTC+1, arthure wrote:
>>
>> I'd add that the Polymer element catalog still uses some `/deep/` and
>> `::shadow` styling, so if you're looking at that site, even though it's
>> written using the 1.0 elements, you'll see console warnings.
>>
>> Cheers,
>> Arthur
>>
>> On Mon, Feb 29, 2016 at 3:35 PM, 'Taylor Savage' via Polymer <
>> [email protected]> wrote:
>>
>>> Hi Blaze,
>>>
>>> I would highly recommend upgrading to the Polymer 1.0 elements. The 0.5
>>> components are no longer actively supported and are based on some
>>> experimental API's, whereas the 1.0 elements are actively supported.
>>>
>>> The /deep/ selector is deprecated in the platform and will be eventually
>>> removed from Chrome. Polymer 1.0+ elements do not rely on this selector at
>>> all. The deprecation warning you might see is because iron-flex-layout
>>> <https://github.com/polymerelements/iron-flex-layout> does pull in some
>>> /deep/ styles for backwards-compatibility, but none of the
>>> PolymerElements <https://github.com/polymerelements> rely on this.
>>>
>>> You can learn more about the /deep/ deprecation on the Polymer blog.
>>> <https://blog.polymer-project.org/announcements/2015/12/01/deprecating-deep/>
>>>
>>> Hope that helps!
>>>
>>> Taylor
>>>
>>> On Tue, Mar 1, 2016 at 5:03 AM, <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I use some of the polymer 0.5 components in production. In the console
>>>> are emited some deprications related to deep and shadow dom. So i was
>>>> wondering if 0.5 components are based on experimental apis? Is it posible
>>>> that the components brake totally in near future? If this happen, can we
>>>> force the lib to use the polifil for every browser?
>>>>
>>>> I also see some of this deprications logged in the console when I open
>>>> the 1.0 polymer components on the polymer.org web page. Are this
>>>> components also not stable and can have big api changes in neer future?
>>>>
>>>> Tnx
>>>> Blaze
>>>>
>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Polymer" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/polymer-dev/3251deb2-43ab-4c0d-825a-1baf30d99fe7%40googlegroups.com
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Polymer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/polymer-dev/CAN-z2fsPDukL4d%2B_VNut-8VR8DxtE5TY4JooLV1wx5%2BvpHgX8g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/polymer-dev/CAN-z2fsPDukL4d%2B_VNut-8VR8DxtE5TY4JooLV1wx5%2BvpHgX8g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/3524ce48-a531-4f76-8abd-5d98f15f3100%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/3524ce48-a531-4f76-8abd-5d98f15f3100%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/CAEKsHmBoRLQSpF3KhNBbaVJukBA4Qf6GS-JjRK6LYCGUEHe4uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.