Skip to content

Document native dom properties that are problematic to override #123

Description

@sorvell

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

Activity

  1. sorvell commented on May 8, 2013

    @sorvell
    ContributorAuthor

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

  2. morethanreal commented on May 8, 2013

    @morethanreal
    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)

  3. martin-gorner commented on Jul 16, 2014

    @martin-gorner

    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)

  4. arthurevans commented on Jul 16, 2014

    @arthurevans

    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!

  5. sorvell commented on Aug 12, 2014

    @sorvell
    ContributorAuthor

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

    #379

  6. tommie commented on Oct 30, 2014

    @tommie

    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.

  7. tjsavage commented on Oct 23, 2015

    @tjsavage
    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions