Amazon interview question

How would you implement document.querySelectorAll manually using recursion?