TypeScript コード:
var el = document.elementFromPoint(x, y);
if (el != null) {
el = el.parentElement;
}
tslint はエラーを出します:
Type 'HTMLElement' is not assignable to type 'Element'.
HTMLElement は Element のサブクラスだと思っていました。何を与える?
TypeScript コード:
var el = document.elementFromPoint(x, y);
if (el != null) {
el = el.parentElement;
}
tslint はエラーを出します:
Type 'HTMLElement' is not assignable to type 'Element'.
HTMLElement は Element のサブクラスだと思っていました。何を与える?