Y
Hacker News
new
|
ask
|
show
|
jobs
by
taf2
4534 days ago
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>
1 comments
antiufo
4534 days 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.
link