Hacker News new | ask | show | jobs
by Kalabasa 846 days ago
Yeah, querySelector(undefined) works

Although location.hash defaults to the empty string '' when there is no hash, which gives a SyntaxError, so we still need the fallback selector to select none.