Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
taf2
· 12y ago · 0 comments
great write up. one thing to remember when traversing the DOM using native APIs whitespace matters.
e.g. <div>#textnode
<span>#textnode</span>#textnode </div>
Comments
[–]
antiufo
12y ago
Which can be safely ignored when using the firstElementChild, nextElementSibling properties and so on. They are not available in old browsers, but a polyfill should be available.