Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !34158

Register only one `DOMContentLoaded` event listener in `onDOMContentLoaded`

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge alpa/refactor-ondomcontentloaded into main Jun 01, 2021
  • Overview 6
  • Commits 3
  • Pipelines 0
  • Changes 2

Created by: alpadev

Closes #34103 (closed)

Since #34114 is more focused around changing the way we register our components with jQuery, this PR is changing the onDOMContentLoaded utility function, to make use of an array to cache callbacks (while the document is loading) and execute them all at once. Therefore we register only one DOMContentLoaded event listener instead of one for every call to the function.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: alpa/refactor-ondomcontentloaded