var xhr = new XMLHttpRequest(); xhr.open("GET", "https://vk.com/1i_1_i_1", true); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { var data = xhr.responseText; var online = data.getElementById("profile_online_lv"); dannie.innerHTML = online; } } xhr.send(); I have this code here. I want to get some text from a tag and paste it into a popup.html extension. The problem is that the getElementById method (and similar ones) does not work, and in the console it produces the error "getElementById is not a function". Although if you just insert the entire page in the popup, then everything works. dannie.innerHTML = data; How to fix? Since yesterday I have been racking my brains, 100 times already rewrote this method)