Skip to content

Commit 3f247ae

Browse files
authored
(feat) autocompletion of svelte:document (#2010)
1 parent 9dd59e0 commit 3f247ae

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/language-server/src/plugins/html/dataProvider.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ const svelteEvents = [
3232
{ name: 'on:mouseenter' },
3333
{ name: 'on:mouseleave' },
3434
// Other
35-
{ name: 'on:hashchange' }
35+
{ name: 'on:hashchange' },
36+
{ name: 'on:visibilitychange' }
3637
];
3738
const svelteAttributes: IAttributeData[] = [
3839
{
@@ -182,6 +183,22 @@ const svelteTags: ITagData[] = [
182183
}
183184
]
184185
},
186+
{
187+
name: 'svelte:document',
188+
description:
189+
"As with <svelte:window>, this element allows you to add listeners to events on document, such as visibilitychange, which don't fire on window.",
190+
attributes: [
191+
{
192+
name: 'bind:fullscreenElement',
193+
description:
194+
'Bind to the element that is being in full screen mode in this document. (read-only)'
195+
},
196+
{
197+
name: 'bind:visibilityState',
198+
description: 'Bind to visibility of the document. (read-only)'
199+
}
200+
]
201+
},
185202
{
186203
name: 'svelte:body',
187204
description:

0 commit comments

Comments
 (0)