---
title: "Breaking: #96604 - Removed ModuleTemplate->addJavaScriptCode()"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:breaking-96604"
source: "Changelog/12.0/Breaking-96604-RemovedModuleTemplate-addJavaScriptCode.rst"
typo3-version: "12.0"
typo3-major: 12
type: "breaking"
issue: 96604
forge: "https://forge.typo3.org/issues/96604"
tags: ["Backend", "PHP-API", "FullyScanned", "ext:backend"]
rendered: "2026-09-24T21:45:06+00:00"
---

# Breaking: #96604 - Removed ModuleTemplate->addJavaScriptCode() {#breaking-96604}

See [forge#96604](https://forge.typo3.org/issues/96604)

## Description {#description}

The backend module related class method `\TYPO3\CMS\Backend\Template\ModuleTemplate->addJavaScriptCode()`
has been removed.

The method allowed to add JavaScript inline code to the document
body of backend modules. This collides with `Content-Security-Policy` HTTP headers
and needs to be avoided.

The method has been marked `@internal` in late TYPO3 v11 development and
has been removed in v12.

## Impact {#impact}

Calling the method in an instance triggers a fatal PHP error.

## Affected Installations {#affected-installations}

The extension scanner finds usage candidates as weak match. In general,
instances with extensions that come with own backend modules may be affected.

## Migration {#migration}

There are various ways to migrate away from inline JavaScript in backend modules, a modern TYPO3 v12
solution is [JavaScript ES6 modules](https://docs.typo3.org/permalink/changelog:feature-96510).
