Getting elementID with click

A really cool thing to have would be when you write on your code:
$w("
and then you click on an element on the website, the $w(" to be auto completed with the elementID of the clicked item.
It would be REALLY cool to have.