Fix: webpage.onError was not called during page loading

The internal error listener was set too late.

Closes #190