A minimal, DOMRect-shaped result (all eight box fields + toJSON). We build our own instead of
new DOMRect(...) so the pure composeCaretRect math stays usable in a non-DOM (node) test
env, and so the result can be handed directly to a float virtual anchor
({ getBoundingClientRect(): DOMRect }) — a plain rect satisfies that contract at runtime.
A minimal,
DOMRect-shaped result (all eight box fields +toJSON). We build our own instead ofnew DOMRect(...)so the pure composeCaretRect math stays usable in a non-DOM (node) test env, and so the result can be handed directly to a float virtual anchor ({ getBoundingClientRect(): DOMRect }) — a plain rect satisfies that contract at runtime.