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

Also available in: Atom PDF