79407509

Date: 2025-02-02 23:13:16
Score: 0.5
Natty:
Report link

There's now an experimental feature to do that:

myElement.focus({ focusVisible: true });

cf https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#focusvisible

Sadly, for now, it's only available on Firefox... https://caniuse.com/mdn-api_htmlelement_focus_options_focusvisible_parameter

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Herobrine