-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
3 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
--- | ||
'astro': major | ||
'astro': patch | ||
--- | ||
|
||
add `checked` to htmlBooleanAttributes. | ||
|
||
Previously, `checked={true}` returned `checked="true"`, which is considered [invalid](https://html.spec.whatwg.org/#boolean-attributes). | ||
Now, this should return `checked` only. | ||
Note: Falsy values would omit the attribute, which is correct behavior. | ||
|
||
You'll only need to edit your existing code if you are checking the `checked` attribute's value to be the string `'true'` like so: | ||
```js | ||
- el.getAttribute('checked') === 'true' | ||
+ el.hasAttribute('checked') | ||
``` | ||
add `checked` to htmlBooleanAttributes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters