Issue Feature Closed

#86295Add a TYPO3 JavaScript frontend API

Markus Mächler 09/18/18, 13:51 updated 07/28/24, 06:46

Description

As a developer there is very little to no support when writing JavaScript code in the frontend. Every time a value from the server is needed in the frontend, the code to glue them together has to be written manually by passing the value to a Fluid template or render a script tag using TypoScript.

It would be awesome if TYPO3 would offer a JavaScript API that offers some basic functionality. This is of growing importance as frontends are becoming more and more complex. This could be a unique feature that sets TYPO3 apart from so many other CMS.

I think the JavaScript API should be independent of any third party framework. Some useful features that come to my mind would be:

- Information about the current page (pid, layout, etc.)
- A utility function to get labels from language files (probably the labels that are available in the frontend have to be configured explicitly)
- Possibility to log frontend JavaScript errors to the backend
- Probably many more …

I know that this is a very big task and it is not easy to decide what should be implemented and how, but I think it is worth to at least consider it.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Riccardo De Contardi changed category 10/07/19, 22:23

  2. Georg Ringer commented and changed status New Closed 07/28/24, 06:46

    Hey Markus,

    i am closing this issue to cleanup forge a bit. This issue is still kind of valid but I doubt there will happen anything in near future because:

    • TYPO3 doesn’t ship any frontend at all
    • There are so many different options, build tools, … and it is impossible to make everyone happy
    • Issues like logging JS errors is nothing a TYPO3 backend should do but done with e.g. sentry.