Skip to content

Commit

Permalink
(feat) autocompletion of svelte:document (sveltejs#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoam committed May 11, 2023
1 parent 9dd59e0 commit 3f247ae
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/language-server/src/plugins/html/dataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const svelteEvents = [
{ name: 'on:mouseenter' },
{ name: 'on:mouseleave' },
// Other
{ name: 'on:hashchange' }
{ name: 'on:hashchange' },
{ name: 'on:visibilitychange' }
];
const svelteAttributes: IAttributeData[] = [
{
Expand Down Expand Up @@ -182,6 +183,22 @@ const svelteTags: ITagData[] = [
}
]
},
{
name: 'svelte:document',
description:
"As with <svelte:window>, this element allows you to add listeners to events on document, such as visibilitychange, which don't fire on window.",
attributes: [
{
name: 'bind:fullscreenElement',
description:
'Bind to the element that is being in full screen mode in this document. (read-only)'
},
{
name: 'bind:visibilityState',
description: 'Bind to visibility of the document. (read-only)'
}
]
},
{
name: 'svelte:body',
description:
Expand Down

0 comments on commit 3f247ae

Please sign in to comment.