I will never understand the desire to handicap interviewees like that. I recently passed an live-coding interview in which I was asked to use an unfamiliar library; bc it was open-book I was able to look up its docs and use it to solve the problem. At one point I also hopped onto MDN to confirm a browser API. The ability to search and effectively leverage available resources is fundamental to our profession. Closed-book "pop quiz"-style puzzles -- where the surface area of the relevant material is unbelievably vast, and the relevance of the problem to the job's requisite skills is tenuous at best -- are highly problematic.
I do strongly agree that people should be able to use whatever resources they normally have (google, mdn, autocompleting editor, etc.). This is how they would work on the job. Getting quizzed on easily referenced random trivia about language features is so dumb.
If you gave me such a code challenge, I'd probably take it as a sign that company culture is to put employees under pressure and I would immediately decline.
I guess it depends on how the company uses it - if they just stick the take-home in as an extra filter vs trying to replace live interview time