i need get xmlhttprequest.responseURL for hbbtv 1.1.1 (version browser Opera 12.11) in vaniliaJS. Is there somebody, who know the answer?
HBBTV 1.1.1 xmlhttprequest.responseURL
237 Views Asked by macMod At
2
There are 2 best solutions below
0
On
If you need the response in the XMLHttpRequest() then the answer is:
try{
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//do something here if you want
}
};
xhttp.open("GET", URL, true); //true for synchronous and false for asynchronous
xhttp.send();
} catch (error){
//do something with the error
}
I'm not familiar with that version of the HbbTV standard, but if supported by a compliant device the documentaiton on MDN should be correct.