Task #78975

Refactor DOM ready check with AMD loader plugin domReady

Added by Gleb Levitin over 4 years ago. Updated over 3 years ago.

Should have
Backend JavaScript
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Sprint Focus:


In #70601 a lot of RequireJS AMDs were provided with a DOM ready check function to prevend their potential run into race condition.
The DOM ready check was taken with JQuery. It works, but in RequireJS there is an AMD loader plugin domReady for this purpose. It should be used instead.

Here is the appropriate API documentation and an understandable example:


Related issues

Related to TYPO3 Core - Bug #70601: Add missing to DOM ready checks to all AMD modulesClosedMarkus Klein2015-10-12

Related to TYPO3 Core - Bug #78976: Add missing DOM ready check for JavaScripts in filelist moduleClosedFrank Naegler2016-12-13


Updated by Frank Naegler over 3 years ago

  • Status changed from New to Needs Feedback

We currently working on a migration to TypeScript, but this alone will not fix this issue, but now it is a good time to talk about other solutions like this one.
Can you explain what is the benefit of this plugin agains jQuery?


Updated by Frank Naegler over 3 years ago

  • Status changed from Needs Feedback to Closed

no feedback within the last three months, so I will close this issue for now.


Updated by Oliver Hader over 3 years ago

I don't think we should use the requireJS domReady plugin since

  • we basically have to deal with applications that are executed in a browser and jQuery's onReady handling in the root component handles that already
  • the mentioned plugin has not been maintained during the last 2 years and has around 130 forks
  • looking into the code reveals some "hacks", e.g. https://github.com/requirejs/domReady/blob/master/domReady.js#L86

Basically, maintaining an internal ready stack is similar in both jQuery and the requireJS plugin.

My conclusion: Let's stay with jQuery ready handling...

Also available in: Atom PDF