i need get xmlhttprequest.responseURL for hbbtv 1.1.1 (version browser Opera 12.11) in vaniliaJS. Is there somebody, who know the answer?
Asked
Active
Viewed 201 times
0
-
There is no such concept as response URL. This may be helpful https://stackoverflow.com/questions/8056277/how-to-get-response-url-in-xmlhttprequest – marekful Oct 27 '17 at 21:54
2 Answers
0
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.

Ian Gilham
- 1,916
- 3
- 20
- 31
0
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
}

Kevin
- 85
- 7