Let's say I have my website open in two tabs, and i want to get the element with the id "id", can I somehow get the element in the currently focused browser tab?
document.getElementById("id");
seems to get the element that was loaded most recently.