Skip to content

Allow customization of "node_invalid_placement" #15963

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

Closed
Maryannah opened this issue May 20, 2025 · 1 comment
Closed

Allow customization of "node_invalid_placement" #15963

Maryannah opened this issue May 20, 2025 · 1 comment

Comments

@Maryannah
Copy link

Describe the problem

Breaking HTML

<select name="accountType" required id="type-input" value={profile}>
        <!-- Here -->
	<button>
		<selectedcontent />
	</button>

	{#each profiles as p}
		<option value={p.value}>{p.label}</option>
	{/each}
</select>

This is now valid HTML as seen on MDN :
https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Customizable_select#customizable_select_markup

Describe the proposed solution

Have the ability to customize the rule AT YOUR OWN RISKS

I think it's delusional to think you can list all quirks of the language and protect users from them, so I prefer to ask for customization rather than adding rule after rule until you cover all use cases.

Importance

would make my life easier

@Prinzhorn
Copy link
Contributor

See #15617

This is now valid HTML as seen on MDN :

whatwg/html#9799

I think it's delusional to think you can list all quirks of the language and protect users from them, so I prefer to ask for customization rather than adding rule after rule until you cover all use cases.

It's a compromise to help users prevent hard to debug bugs. If you insert invalid HTML, the browser will "fix it" leaving Svelte in an inconsistent state about what it thinks the DOM should look like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants