<svelte:document>
<svelte:document onevent={handler} /><svelte:document bind:prop={value} />Similarly to <svelte:window>, this element allows you to add listeners to events on document, such as visibilitychange, which don't fire on window. It also lets you use attachments on document.
<svelte:window> と同様に、この要素はコンポーネントのトップレベルにのみ配置でき、ブロックや他の要素の中に含めることはできません。
<svelte:document onvisibilitychange={handleVisibilityChange} {@attach someAttachment} />以下のプロパティにもバインドできます:
activeElementfullscreenElementpointerLockElementvisibilityState
すべて読取専用です。
Edit this page on GitHub llms.txt
previous next