Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
niceguyneil
· 12y ago · 0 comments
Suggestion: allow passing in target as a DOMElement, rather than by id. That makes this more useful when template rendering in done off-DOM, or when IDs aren't used.
Comments
[–]
zackbloom
12y ago
If it's an object treat it as a dom node, if it's a string, run it through document.querySelector.