You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Those properties are currently not defined in polymer.Base. Can this be corrected by having polymer.Base extend Element?
Of course, this request assumes that all custom elements are indeed of type Element, and I am not familiar enough with the Polymer 1.0 implementation to know whether that is the case. Is it correct that custom elements are always created by calling createElement() (which returns an object of type Element)?
I came across this issue filed with the TypeScript GitHub repository, which seems relevant. Perhaps that issue needs to be addressed before a change can be made in PolymerTS?
The text was updated successfully, but these errors were encountered:
almstrand
changed the title
Missing definitions
Missing Element definitions
Aug 11, 2015
the wrong type is a temporary issue, we are waiting for this issue to be solved in TypeScript. When it will be fixed, your "el" will be an extension of type HTMLElement and you will be able to do DOM operations with it.
I tried once to copy HTMLElement from lib.d.ts but there's a very long chain, so we better wait it to be fixed (I hope in 1.6).
The following code runs as expected, though the TypeScript type checker does not recognize properties
clientWidth
orclientHeight
:Those properties are currently not defined in
polymer.Base
. Can this be corrected by havingpolymer.Base
extendElement
?Of course, this request assumes that all custom elements are indeed of type
Element
, and I am not familiar enough with the Polymer 1.0 implementation to know whether that is the case. Is it correct that custom elements are always created by callingcreateElement()
(which returns an object of typeElement
)?I came across this issue filed with the TypeScript GitHub repository, which seems relevant. Perhaps that issue needs to be addressed before a change can be made in PolymerTS?
The text was updated successfully, but these errors were encountered: