DEV Community

Discussion on: 10 useful HTML5 features, you may not be using

Collapse
 
sal7one profile image
Saleh Alanazi • Edited

This is so cool, thanks for sharing!. I actually have one I just found out about. If you have an onclick in an HTML tag and you pass "this" as an argument to whatever function you're calling. You can use that HTML element in JS and get it's tag info / modify it, or it's parents/children. without a query selector!!!

try it here! click the button on the far right. (html view)
jsbin.com/feyuhaxivo/edit?html,js,...

Collapse
 
atapas profile image
Tapas Adhikary

Cool, thanks!