On Thu, Nov 13, 2014 at 7:42 PM, Anne van Kesteren <ann...@annevk.nl> wrote:

>
>
> http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Sep/thread.html#msg24
>
> It seems in scope for the specification that defines window.onerror...
>
> Someone is working on standardizing parts of the console API as well.
> I think it's required these days since it leaked on the web.


One challenge I've had with window.onerror is catching the errors in
another window (or iframe), since it's not possible to attach an onerror
handler before the window content loads (because it is overwritten when the
window content loads). The result is that the parent window cannot catch
errors in the child window without the child window opting into it, by
setting `window.onerror = window.parent.onerror`. If window.onerror and a
possble window.onPromiseCatch is to be standardized then it should be
possible for one window to handle the errors in child windows (taking same
origin and CSP into consideration ofcourse). This should probably be
generalized to realms, so that one realm can catch all the errors in
another realm.

Marius Gundersen
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to