Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document native dom properties that are problematic to override #123

Closed
sorvell opened this issue May 8, 2013 · 7 comments
Closed

Document native dom properties that are problematic to override #123

sorvell opened this issue May 8, 2013 · 7 comments

Comments

@sorvell
Copy link
Contributor

sorvell commented May 8, 2013

e.g. appendChild, removeChild, and various native properties...

@sorvell
Copy link
Contributor Author

sorvell commented May 8, 2013

Implementing the title property in a custom element prototype causes an issue with mdv (https://github.com/toolkitchen/toolkit/issues/97).

@morethanreal
Copy link
Contributor

HTMLElement.properties is defined as read-only but configurable so a custom element need to define properties in its prototype if it wants to use it. (breaks on firefox)

@martin-gorner
Copy link

I noticed this when attempting to template-bind a custom element that implemented "title" or "id" as a published property.

<polymer-element name="greetings-list" attributes="list">
    <template>
        <template repeat="{{g in list}}">
            <paper-card title="{{g.text}}"></paper-card>
        </template>
...

If element paper-card publishes "title" as an attribute, then the above will not work (the string "{{g.text}}" gets passed in instead of the g.text value).
Renaming title into titlex makes it work.
Using [[g.text]] makes it work too.

(Polymer 0.3.4)

@arthurevans
Copy link

Are there any native properties/methods that are NOT problematic to override?

I added a blanket caution here (Polymer/old-docs-site#530), but it is somewhat vague. Wording suggestions welcome!

@sorvell
Copy link
Contributor Author

sorvell commented Aug 12, 2014

We'd also like to issue a warning in this case, see:

#379

@tommie
Copy link

tommie commented Oct 30, 2014

How will this problem with (I assume) HTML5 global attributes and JS Object properties affect forward-compatibility of Polymer components?

It sounds like if someone adds more attributes/properties to the standards, we risk ruining existing components. Namespacing comes to mind, but is of course less than desirable.

@tjsavage tjsavage added the 0.5 label May 21, 2015
@tjsavage
Copy link
Contributor

Closing this issue due to age and the release of version 1 release of Polymer - please feel free to re-open if this is incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
@sorvell @tommie @tjsavage @martin-gorner @arthurevans @morethanreal and others