Yes, use the inspect
method.
inspect(document.querySelector("#some-id"));
Frage
If you in Chrome workspace javascript Console do
document.querySelector("#some-id")
the element with this id will be shown in the console. You can then right-click on it to reveal it in the Elements tab. Can I reveal it in the Elements tab with javascript instead?
Lösung
Yes, use the inspect
method.
inspect(document.querySelector("#some-id"));