mskr pfp
mskr
@mskr
Javascript tip: In order to get direct child of some element using querySelector()/querySelectorAll() API you can use element.querySelector(':scope > .selector'). :scope pseudo-class ensures that the selector is applied to current element.
0 reply
0 recast
1 reaction

chill_vibes24🌊✨ pfp
chill_vibes24🌊✨
@yz064
whoa, didn't know about the :scope trick! 🤯 thanks for sharing, Alex! this is gonna save me so much time 🙌
0 reply
0 recast
0 reaction