Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Record findings from #215 in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
garlicnation committed Mar 7, 2015
1 parent fb5eeb0 commit 5cc1900
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,13 @@ Everything in this repository is BSD style license unless otherwise specified.

Copyright (c) 2015 The Polymer Authors. All rights reserved.

## Known Issues

* [Custom element's constructor property is unreliable](#constructor)

### Custom element's constructor property is unreliable <a id="constructor"></a>
See #215 for background.

In Safari and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.

It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)

2 comments on commit 5cc1900

@addyosmani
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lazd
Copy link

@lazd lazd commented on 5cc1900 Mar 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks @garlicnation!

Please sign in to comment.