Last Updated: February 25, 2016
·
2.483K
· mgrassotti

JS Console Trick: Use $0 to access inspected element

WTF how did I not already know this?

when you right-click an element in your browser and choose "Inspect Element" that a reference to that element is injected into the console's scope. You can access the inspected element as $0. There is also a history kept, so $1, $2, etc. also can be used
@ebryn, https://github.com/ebryn/ember-console-utils

alt