refactor(js): use DOMContentLoaded instead of ds:page:update
This commit is contained in:
parent
38e152f755
commit
0dac59bffc
4 changed files with 5 additions and 5 deletions
|
@ -54,5 +54,5 @@ function saveMessageContent() {
|
|||
}
|
||||
}
|
||||
|
||||
addEventListener('ds:page:update', scrollMessagerie);
|
||||
addEventListener('ds:page:update', saveMessageContent);
|
||||
addEventListener('DOMContentLoaded', scrollMessagerie);
|
||||
addEventListener('DOMContentLoaded', saveMessageContent);
|
||||
|
|
|
@ -14,7 +14,7 @@ function expandProcedureDescription() {
|
|||
descBody.classList.remove('read-more-collapsed');
|
||||
}
|
||||
|
||||
addEventListener('ds:page:update', updateReadMoreVisibility);
|
||||
addEventListener('DOMContentLoaded', updateReadMoreVisibility);
|
||||
addEventListener('resize', updateReadMoreVisibility);
|
||||
|
||||
delegate('click', '.read-more-button', expandProcedureDescription);
|
||||
|
|
|
@ -101,7 +101,7 @@ class ButtonExpand {
|
|||
|
||||
if (document.querySelector('#contact-form')) {
|
||||
window.addEventListener(
|
||||
'ds:page:update',
|
||||
'DOMContentLoaded',
|
||||
function () {
|
||||
var buttons = document.querySelectorAll(
|
||||
'button[aria-expanded][aria-controls], button.button-without-hint'
|
||||
|
|
|
@ -20,7 +20,7 @@ function init() {
|
|||
}
|
||||
}
|
||||
|
||||
addEventListener('ds:page:update', init);
|
||||
addEventListener('DOMContentLoaded', init);
|
||||
|
||||
function toggleElement(event) {
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue