Javascript ReferenceError

I ask myself whether could be a better way to use something like “document.onreadystatechange”?

We’re working on improving this! But in the meantime, there’s a workaround, as described in this post: