const editContext = new EditContext();
editorElement.editContext = editContext;
editContext.addEventListener("characterboundsupdate", (e) => {
console.log(
`The OS needs the bounds of the chars at ${e.rangeStart} - ${e.rangeEnd}.`,
);
});CharacterBoundsUpdateEvent: rangeEnd property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.