Commit b0f49539 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'remove-DOM-Content-Loaded-EventListener-from-registration-pages' into 'master'

Remove DOMContentLoaded Eventlistener

See merge request gitlab-org/gitlab!47619
parents c35fac56 3cb1ac27
import initProductivityAnalyticsApp from 'ee/analytics/productivity_analytics';
document.addEventListener('DOMContentLoaded', () => {
initProductivityAnalyticsApp();
});
initProductivityAnalyticsApp();
......@@ -5,9 +5,7 @@ import GroupPathValidator from '~/pages/groups/new/group_path_validator';
import BindInOut from '~/behaviors/bind_in_out';
import Group from '~/group';
document.addEventListener('DOMContentLoaded', () => {
mountComponents();
new GroupPathValidator();
BindInOut.initAll();
new Group();
});
mountComponents();
new GroupPathValidator();
BindInOut.initAll();
new Group();
......@@ -2,8 +2,6 @@ import mountProgressBar from 'ee/registrations/projects/new';
import initProjectVisibilitySelector from '~/project_visibility';
import initProjectNew from '~/projects/project_new';
document.addEventListener('DOMContentLoaded', () => {
mountProgressBar();
initProjectVisibilitySelector();
initProjectNew.bindEvents();
});
mountProgressBar();
initProjectVisibilitySelector();
initProjectNew.bindEvents();
import mountProgressBar from 'ee/registrations/welcome';
document.addEventListener('DOMContentLoaded', () => {
mountProgressBar();
});
mountProgressBar();
import mountProgressBar from 'ee/registrations/welcome';
document.addEventListener('DOMContentLoaded', () => {
mountProgressBar();
mountProgressBar();
const emailUpdatesForm = document.querySelector('.js-email-opt-in');
const setupForCompany = document.querySelector('.js-setup-for-company');
const setupForMe = document.querySelector('.js-setup-for-me');
const emailUpdatesForm = document.querySelector('.js-email-opt-in');
const setupForCompany = document.querySelector('.js-setup-for-company');
const setupForMe = document.querySelector('.js-setup-for-me');
setupForCompany.addEventListener('change', () => {
emailUpdatesForm.classList.add('hidden');
});
setupForCompany.addEventListener('change', () => {
emailUpdatesForm.classList.add('hidden');
});
setupForMe.addEventListener('change', () => {
emailUpdatesForm.classList.remove('hidden');
});
setupForMe.addEventListener('change', () => {
emailUpdatesForm.classList.remove('hidden');
});
---
title: Remove DOMContentLoaded Eventlistener
merge_request: 47619
author:
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment