I'm working in a 3rd party app that was written in React & Angular (I do not have access to the React source code), and I want to add a click handler to a specific element in a popup menu. By tracing the click, I was able to see that the node's ID is 'div#sendemail285737238350' but when I issue document.querySelectorAll("[id^=send]") in the console, the NodeList is empty. It also has an "ariaLabel" of " Send an Email" but $("[ariaLabel=' Send an Email']", window); also returns an empty list.
Of course, the DOM manipulation may happen when the popup menu is clicked, so I deferred both DOM searches till after the top-level element was clicked. I also have the React dev tools installed and the menu item is not listed in the components list.
Is there any way to grab this element and piggy-back a click handler onto it? Seems like there should be - the browser can render it, so why can I not get to it?