I have some jquery-like function:
function(elem) {
return $('> someselector', elem);
};
The question is how can i do the same with querySelector()
?
The problem is >
selector in querySelector()
requires parent to be explicitly specified. Is there any workaround?
©2020 All rights reserved.