Inline ErrorEventHandler

It doesn't really exist in the Javascript; the only reason it's there is because it got imported from Typescript, and it causes some annoyance like being unable to pass lambdas to it without weird casting