The getElementAtCursor function always returns the topmost HTML element it finds at the cursor position. Just in case the video/img is nested, I walk through children looking for it until it finds it.
One example test case I found was on D2L (Learn), where the video lecture was not the topmost element. It was actually hidden in shadowRoot.
The getElementAtCursor function always returns the topmost HTML element it finds at the cursor position. Just in case the video/img is nested, I walk through children looking for it until it finds it.
One example test case I found was on D2L (Learn), where the video lecture was not the topmost element. It was actually hidden in shadowRoot.