3 ms·
Using JavaScript to remove certain lines from the code examples in the book is such a weird choice.
by ben0x539 8y ago
Using JavaScript to remove certain lines from the code examples in the book is such a weird choice.
- steveklabnik 8y agoIt’s primarily so that tests can still be run, while presenting only the info you want to show to those who read the docs.
- ben0x539 8y agoYou should filter those lines before they hit .html files.
- maxbrunsfeld 8y agoThere's a button to toggle whether these lines are shown or hidden. Implementing this button's behavior using JavaScript seems perfectly reasonable to me.
- steveklabnik 8y agoYes, you want to be able to show people that it needs additional context to work, and what that context is.
- epage 8y agoI 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.
- coldtea 8y agoSo that the 0.01% of people who turn off Javascript have a nicer experience?
- pjmlp 8y agoActually turning it off makes quite a pleasant experience not being easily tracked, getting tons of adds and JS minified libraries bigger than Quake.
- isUser 8y agoI take it you don't perform such exotic activities within the browser as upvoting or collapsing subthreads on HN?
- coldtea 8y agoIt also kills more than half of the actual functionality. If you just want the text, you can use Links.
- pjmlp 8y agoNo I want Internet without the JavaScript fluff. Websites that deserve it and I bother to use them, or lack alternatives, do get white listed.