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

AbstractRange.collapsed

Baseline Widely available

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

AbstractRange의 범위가 축소된 read-only 속성은 범위의 시작 위치와 끝 위치가 같을 경우 true를 반환합니다.

문법

js
var isCollpased = range.collapsed;

Value

범위가 축소된 경우 true인 Boolean값을 반환합니다. 축소된 범위는 시작 위치와 종료 위치가 동일하며, 문자 길이가 0인 범위입니다.

명세

Specification
DOM
# ref-for-dom-range-collapsed①

브라우저 호환성