0

TypeScript コード:

var el = document.elementFromPoint(x, y);
if (el != null) {
  el = el.parentElement;
}

tslint はエラーを出します:

Type 'HTMLElement' is not assignable to type 'Element'.

HTMLElement は Element のサブクラスだと思っていました。何を与える?

4

0 に答える 0