// window.document.documentElement.className.replace('no-js', 'js');
window.document.documentElement.className = window.document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)
<html>
<script>document.body.parentElement.className = document.body.parentElement.className.replace('no-js', 'js');</script>
<body>
<script type="text/javascript">document.body.className = ((document.body.className) ? document.body.className + ' js' : 'no-js');</script>