def is_focused(self):
        active_el = self.browser.execute_script("return document.activeElement")
        query_results = self.map(lambda el: el == active_el, 'focused').results

        if query_results:
            return any(query_results)
        else:
            return False
Checks that _at least one_ matched element is focused. More
dataset/ETHPy150Open edx/bok-choy/bok_choy/query.py/BrowserQuery.is_focused