It’s primarily so that tests can still be run, while presenting only the info you want to show to those who read the docs.
You should filter those lines before they hit .html files.
There's a button to toggle whether these lines are shown or hidden. Implementing this button's behavior using JavaScript seems perfectly reasonable to me.
Yes, you want to be able to show people that it needs additional context to work, and what that context is.
I appreciate this. There are too many times that example code omits things and as someone new you get confused as to what the boiler plate is you should use.
So that the 0.01% of people who turn off Javascript have a nicer experience?
Actually turning it off makes quite a pleasant experience not being easily tracked, getting tons of adds and JS minified libraries bigger than Quake.
I take it you don't perform such exotic activities within the browser as upvoting or collapsing subthreads on HN?
You don't need JavaScript for voting.
It also kills more than half of the actual functionality.
If you just want the text, you can use Links.
No I want Internet without the JavaScript fluff.
Websites that deserve it and I bother to use them, or lack alternatives, do get white listed.