Add more handlers

Add `onerror` and `onreadystatechange` handlers/callbacks. Adding `onreadystatechange` should extend browser compatibility back to IE 7.