Task #90871
closedChange AssetCollector ViewHelpers attributes async, defer, nomodule, disabled to boolean
100%
Description
Currently any value given in the ViewHelper would be output exactly like it was given.
<f:asset.script async="1"...
will produce
<script async="1" ...
As these are boolean HTML attributes they are only allowed to be empty [HTML5] or contain exactly the tag attribute's name (async="async") [any].
As such it would make sense to change the ViewHelpers' parameters to boolean, too.
In order to not break anything and keep the output in line with PageRenderer's page.includeJS
it should output
<script async="async" ...
References:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link
Updated by Georg Ringer over 4 years ago
- Related to Feature #90181: TagBuilder does not support boolean attributes without values added
Updated by Georg Ringer over 4 years ago
should we close this in favor of #90181?
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63996
Updated by Anonymous over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 66f36c25d57ddb2a3c68fbc1ae05cdba64254089.
Updated by Jonas Eberle over 4 years ago
Sorry Georg, I saw your comment too late.