krakenjs/cross-domain-utils

Better error handling

Closed this issue · 1 comments

I was writing a cross-domain component with zoid in my webapp and trying to get it to work on IE by setting up a bridge, everything works fine on my working machine but broken when running on the testing server, I checked out the browser console and found no useful error or warning, so I just spent hours debugging the code to figure out what's going wrong.

Finally I got the cause that the sayhello step failed for the window.opener being undefined in the child window when the Protected Mode for Internet zone turned on under the security settings in IE.
When I was debugging, I just found that there're code catching errors but then do nothing on them, like this one:


Why not just rethrowing or at least log warnings when we get unexpected values ? So that we could get more useful information from the console when things go wrong.

@louietan Sorry for the late reply but want to reply to your concern. We can't support protected mode as we will not know whether window.opener being null is a bug or if the window genuinely doesn't have an opener. Thank you. Here is a doc we have describing this: https://developer.paypal.com/docs/checkout/troubleshoot/internet-explorer/