Polymer 0.5 and production use

85 views
Skip to first unread message

baz...@gmail.com

unread,
Feb 29, 2016, 1:03:06 PM2/29/16
to Polymer
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

Taylor Savage

unread,
Feb 29, 2016, 6:35:29 PM2/29/16
to baz...@gmail.com, Polymer
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 does pull in some /deep/ styles for backwards-compatibility, but none of the PolymerElements rely on this.

You can learn more about the /deep/ deprecation on the Polymer blog.

Hope that helps!

Taylor

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 polymer-dev...@googlegroups.com.
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.

Arthur Evans

unread,
Mar 3, 2016, 2:22:37 PM3/3/16
to Taylor Savage, baz...@gmail.com, Polymer
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

baz...@gmail.com

unread,
Mar 4, 2016, 6:43:10 AM3/4/16
to Polymer, tjsa...@google.com, baz...@gmail.com

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?

Tnx
Blaze

Justin Fagnani

unread,
Mar 4, 2016, 2:14:11 PM3/4/16
to baz...@gmail.com, Polymer, Taylor Savage
On Fri, Mar 4, 2016 at 3:43 AM, <baz...@gmail.com> 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'))


Hope that helps!
  Justin

 
Reply all
Reply to author
Forward
0 new messages