DEV Community

Aleksei Aleinikov
Aleksei Aleinikov

Posted on

Small Web APIs That Quietly Fix Annoying UI Code

Not every useful web platform improvement is a big feature.

Some are just small fixes for old frontend annoyances.

ToggleEvent.source helps answer: what actually triggered this popover or dialog change?

dialog.closedBy helps define: how should this dialog be allowed to close?

Less glue code.
Clearer intent.
More native-feeling UI behavior.

https://medium.com/code-your-own-path/what-toggleevent-source-and-dialog-closedby-actually-fix-70d31fde9734?sk=aaa2e4a690e50422faa6140c3010df82

javascript #webdev #frontend #html

Top comments (0)