-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Mention avoid binding to HTML global properties #90
Comments
I think this is a misunderstanding. There is no problem binding to HTML global attributes that I'm aware of. The known problem area is with overriding native properties. So, if you put |
It's possible I misunderstood @sorvell. What about the case where the published property is a native property and you want to initialize it via attribute data binding e.g. |
No, that should work just fine. The issue is only doing what Scott Problem: Polymer.register(this, { On Fri, Jun 21, 2013 at 4:30 PM, Eric Bidelman [email protected]:
|
There's a lot of subtly here. How about http://jsbin.com/ofoqah/3/edit
Most people are going to try something similar to this and scratch their head for eternity. |
We have an ticket which involves throwing a warning if you attempt to override a native property (which, btw, you should totally be able to do except for for historical browser nasties). If you think users will find this confusing, I think it means we need a better way of talking about it, because the underlying conceptual model is simple and sane. |
The Warnings will go a long way to help the head scratching. Properties won't be magically gobbled up into browser unknown. Do you have the ticket? To explain it, we have callout under publishing properties that points to source and the list of props that generate warnings. |
Should have closed this a while back. There is an explicit caution in this section: http://www.polymer-project.org/docs/polymer/polymer.html#propertiesmethods (under the element prototype chain). |
http://www.w3.org/html/wg/drafts/html/master/dom.html#global-attributes
.style
for example, presents all kinds of problems.The text was updated successfully, but these errors were encountered: