-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
The following code runs as expected, though the TypeScript type checker does not recognize properties clientWidth
or clientHeight
:
/// <reference path="../../bower_components/polymer-ts/polymer-ts.ts" />
@component("my-element")
class MyElement extends polymer.Base {
attached() {
console.log(this.clientWidth + 'x' + this.clientHeight);
}
}
MyElement.register();
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?
Metadata
Metadata
Assignees
Labels
No labels