readystatechange
is a standard event for XMLHttpRequest
objects, and so should be able to have functions listen on the event either using
r.onreadystatechange = function() { ... };
as well as
r.addEventListener('readystatechange', function() { ... }, false);
However, the latter method only seems to work in Firefox and Chrome, but not Opera, which does not throw an error but simply has no effect. Why is this, and is this even correct behaviour?