domRect = element.getBoundingClientRect();
출처:
https://developer.mozilla.org/ko/docs/Web/API/Element/getBoundingClientRect
Element.getBoundingClientRect() - Web API | MDN
Element.getBoundingClientRect() 메서드는 엘리먼트의 크기와 뷰포트에 상대적인 위치 정보를 제공하는 DOMRect 객체를 반환합니다.
developer.mozilla.org
까먹지마~~~~~~
'Frontend > JavaScript' 카테고리의 다른 글
Temporal Dead Zone 줄여서 TDZ ! (2) | 2022.06.03 |
---|---|
Set 에 대해 알아보자.. (0) | 2022.06.02 |
String.prototype.charAt() (0) | 2022.04.18 |
이벤트 버블링, 캡처링 (0) | 2022.04.10 |
e.preventDefault(); (0) | 2022.04.10 |