"What is the recommended way of hiding features that require JavaScript on browsers that do not support JavaScript, e.g., on w3m?"
You can try the <noscript> tag.