Skip to content

Allow bind:open with <dialog> #4723

@tvanc

Description

@tvanc

Attempting to use bind:open with <dialog> results in an error:

<!-- Dialog.svelte -->
<script>
  export let open = false
</script>

<dialog bind:open />
<!--
Error: Module build failed (from ./node_modules/svelte-loader/index.js):
Error: ValidationError: 'open' binding can only be used with <details> (17:46)
-->

To Reproduce
View REPL

Expected behavior
I expected bind to work with <dialog> as well as <details>.

Information about your Svelte project:
Svelte v3.21.0

Severity
Annoying.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions