Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for resize observer bindings #2044

Merged
merged 2 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/language-server/src/plugins/html/dataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@ const svelteAttributes: IAttributeData[] = [
name: 'bind:offsetHeight',
description: 'Available for block level elements. (read-only)'
},
{
name: 'contentRect',
description: 'Available for all elements. (read-only)'
},
{
name: 'contentBoxSize',
description: 'Available for all elements. (read-only)'
},
{
name: 'borderBoxSize',
description: 'Available for all elements. (read-only)'
},
{
name: 'devicePixelContentBoxSize',
description: 'Available for all elements. (read-only)'
},
PatrickG marked this conversation as resolved.
Show resolved Hide resolved
{
name: 'bind:this',
description:
Expand Down
6 changes: 5 additions & 1 deletion packages/svelte2tsx/src/htmlxtojsx_v2/nodes/Binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ const oneWayBindingAttributes: Set<string> = new Set([
'ended',
'readyState',
'naturalWidth',
'naturalHeight'
'naturalHeight',
'contentRect',
'contentBoxSize',
'borderBoxSize',
'devicePixelContentBoxSize'
]);
/**
* List of all binding names that are transformed to sth like `binding = variable`.
Expand Down