HTML Element
document.getElement* 메소드를 통해 얻은 객체
constructor.name
DOM을 가져와서 constructor.name 프로퍼티를 조회하면 객체가 단수인지 복수인지 알수있음
HTMLElement : 단수
HTMLCollection: 복수(유사배열)
HTMLElement
각 태그들은 HTMLElement 객를 상속받는 인터페이스로 공통적으로 HTMLElement 객체의 속성을 사용할 수 있고, 각 태그별로 사용가능한 속성이 다르기 때문에 프로퍼티도 다름(HTMLLIElement, HTMLAnchorElement, HTMLInputElement 등)
HTMLElement는 Element의 자식이고, Element는 Node의 자식이다. Node는 Object의 자식이다. 이러한 계를 DOM Tree 라고 함
Last updated
Was this helpful?