Issue Task Closed

#91122Introduce DocumentService as JQuery.ready substitute

Oliver Hader 04/18/20, 22:39 updated 04/21/20, 10:42

Description

DocumentService provides native JavaScript functions to detect DOM ready-state using a Promise.

$(document).ready(() => {...});

can be replaced by

import documentService = require('TYPO3/CMS/Core/DocumentService');
documentService.onReady().then(() => {...});

Reviews 1