--- title: --- Similar to ``, the `` element allows you to listen for events that fire on `document`. This is useful with events like `selectionchange`, which doesn't fire on `window`. Add the `selectionchange` handler to the `` tag: ```svelte ``` > Avoid `mouseenter` and `mouseleave` handlers on this element, these events are not fired on `document` in all browsers. Use `` for this instead.