v152 · Web APIs · DOM

Multiline Geometry

createOpaqueRange(start, end).getClientRects() returns one rect per visual line in the selection. For a span that wraps across three lines, you get three rects. This page lets you set a character range and see the per-line breakdown — useful for building multi-line selection overlays, underlines, or custom scrollbar indicators.

Start End

see also

feature reference

ChromeStatus entry