Post #2981912
2026-02-15 16:12 UTC
Replies (7)
-
@blinry@chaos.social 2026-02-15 16:18
There are more "Console Helpers" in #firefox: $_ is a shortcut to the result of the last expression you executed, allowing you to do some neat step-by-step exploration. And $0 refers to the currently-inspected element on the page.
-
@adamhotep@infosec.exchange 2026-02-15 16:58
@blinry@chaos.social what is the difference between $$(…) and $$$(…)? I didn't know about $$(…)
-
@slashme@infosec.exchange 2026-02-15 18:09
@blinry@chaos.social Small difference: document.querySelectorAll returns a NodeList, not an Array, which means some methods such as map() are missing. $$() returns an Array instead.
-
@groxx@hachyderm.io 2026-02-15 18:14
@blinry@chaos.social and $0 is the currently selected element - I end up using this more than $(...) selectors by a long shot, unless I need to find multiple elements
-
@lukeharby@infosec.exchange 2026-02-15 19:15
@blinry@chaos.social I thought modern JS borrowed some of the better parts from jQuery and this sounds like one of them.
-
@diazona@techhub.social 2026-02-15 19:22
@blinry@chaos.social Huh I think I've used that once or twice but I thought it was due to jQuery having been loaded by the web page. TIL 🙂
-
@elpres@mastodon.social 2026-02-16 07:03
@blinry@chaos.social There is also $x which takes an XPath selector as its argument