Issue Task Closed

#95278Deprecate inline JavaScript in ModuleTemplate components

Oliver Hader 09/20/21, 12:27 updated 10/15/21, 12:10

Description

ModuleTemplate components API allows to use onclick event attributes containing inline JavaScript. Capabilities have been introduced with #69814 (https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/7.6/Feature-69814-ModuleTemplateAPI.html).

Corresponding onclick functionality will be deprecated and removed in TYPO3 v12.0 – this particular functionality is not used by the TYPO3 core at all, but is used by several extensions. The scope of this task is to provide some good examples concerning potential migration.

// this shall be deprecated and avoided
$viewButton = $buttonBar->makeLinkButton()
  ->setOnClick(...);

Usages in (some) extensions:

Reviews 1