Skip to content

Improve JS Initialisation that we do on each page

Tim Zallmann requested to merge tz-improve-mainjs into master

What does this MR do?

Improves setup of main.js and header.js so that during initialisation we defer load to a later point. This is a first incremental step but definitely more to come. This reduces time to first paint and time of execution for domContentLoaded

Moved Initialisations in 'main.js' to function (deferredInitialisation) which is executed through requestIdleCallback. This executes normally ms after the first rendering is done.

  • Init BreadCrumbs
  • Init Importer Status
  • Init Todo Toggle
  • Init Logo Animation
  • Init Search Autocomplete
  • Init Performance Bar if there is one
  • Focus Behaviour
  • Global Ajax Handling
  • Awards Handler

header.js

  • requestIdleCallback for initialisation of the User Status Modals

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Tim Zallmann

Merge request reports