REFACTOR chain window.onerror

Do not override previous `window.onerror` instruction, but chain it if
any.