Y
Hacker News
new
|
ask
|
show
|
jobs
by
zabraxias
4526 days ago
What if $(el).length === 0?
1 comments
exizt88
4526 days ago
This check is required in both cases. el.outerHTML assumes that el is not NULL (which it could be as a result of getElementById, for example).
link