What is Nostr?
Eric A. Meyer /
npub1dge…yw0u
2023-10-12 01:26:33

Eric A. Meyer on Nostr: Today I learned about JS’s `Element.closest()`, which finds the closest ancestor of ...

Today I learned about JS’s `Element.closest()`, which finds the closest ancestor of an element based on a CSS selector you put into the parentheses. So `el.closest('section')` will find the nearest-ancestor `section` element to the element represented by `el`. *Very* nice. https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
Author Public Key
npub1dgewglf93wmf9u26ppwmmjmqa5uphv5jrtmtfkc3q7n754z3p8xqyayw0u