I tested two kinds of doing XHR
:
1.
xhr.onreadystatechange = function() {
if (this.readyState == 4 && xhr.status !== 500) {
function getElementByXpath(path) {
2.
xhr.onload= function() {
function getElementByXpath(path) {
and don't realized any difference. Could somebody point me to it? Or is there realy no one?