Project

General

Profile

Actions

Task #90871

closed

Change AssetCollector ViewHelpers attributes async, defer, nomodule, disabled to boolean

Added by Jonas Eberle over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2020-03-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

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


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Feature #90181: TagBuilder does not support boolean attributes without valuesAccepted2020-01-23

Actions
Actions #1

Updated by Georg Ringer over 4 years ago

  • Related to Feature #90181: TagBuilder does not support boolean attributes without values added
Actions #2

Updated by Georg Ringer over 4 years ago

should we close this in favor of #90181?

Actions #3

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

Actions #4

Updated by Anonymous over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Jonas Eberle over 4 years ago

Sorry Georg, I saw your comment too late.

Actions #6

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF