🤷‍♂️ JS body class

👋 FYI, this note is over 6 months old. Some of the content may be out of date.
On this page

Add to <body> Jump to heading

window.document.body.classList.add('some-class')
window.document.body.classList.replace('no-js', 'js')

Add to <html> Jump to heading

window.document.documentElement.classList.replace('no-js', 'js')

← Back home