Skip to content

Commit

Permalink
remove listener for DOMContentLoaded
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Jun 20, 2024
1 parent d22ca49 commit 28aa44a
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions static/js/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,10 @@
};

// Set up the localized features object with methods
const attachMethodsToObject = () => {
const methods = {
isEnabled,
enable,
disable,
};
window.NewfoldFeatures = { ...window.NewfoldFeatures, ...methods };
const methods = {
isEnabled,
enable,
disable,
};

// Attach methods when DOM is ready
window.addEventListener( 'DOMContentLoaded', () => {
attachMethodsToObject();
} );
window.NewfoldFeatures = { ...window.NewfoldFeatures, ...methods };
}

0 comments on commit 28aa44a

Please sign in to comment.