If i want to find all elements that are inside a box region, what is the best way to do it as a Firefox extension? If i check all leave elements and call getBoundingClientRect(), it'd be too slow given that there can easily be more than 500 leaves on a page.
Any help will be appreciated. Thanks.