This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

DOMRect()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2020년 1월⁩.

DOMRect() 생성자는 새로운 DOMRect 객체를 생성합니다.

구문

js
new DOMRect(x, y, width, height);

매개변수

x

DOMRect 원점의 X 좌표입니다.

y

DOMRect 원점의 Y 좌표입니다.

width

DOMRect의 너비입니다.

height

DOMRect의 높이입니다.

반환 값

새로운 DOMRect 객체.

명세

Specification
Geometry Interfaces Module Level 1
# dom-domrect-domrect

브라우저 호환성

같이 보기