Skip to content

Default values for native properties may be incorrect #180

@sorvell

Description

@sorvell

Older versions of Chrome and Safari store native property values on the instance (e.g. id and name). If property accessors are created for these, the instance value will overwrite the element's default value set in the constructor. For example, if the element sets this.id = 'id' in the constructor and the element has no id at upgrade time, the id will become '' (empty string) since this is the native platform default.

This could be addressed by keeping a Set of these problematic properties and handling them specially, but this doesn't seem worth it since this case is exceedingly rare. There is currently a failing test which must be fixed and the limitation should be documented.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions