ccoenraets / forcejs

Micro library to use the Salesforce REST APIs in JavaScript Apps
175 stars 61 forks source link

oauthcallback.html not working on Edge #36

Open zonski opened 5 years ago

zonski commented 5 years ago

The default oauthcallback.html does not seem to work on Microsoft Edge. This code:

    var event = new CustomEvent("oauthCallback", {"detail": window.location.href});
    window.opener.document.dispatchEvent(event);
    window.close();

Fails on the dispatchEvent line with error:

SCRIPT87: SCRIPT87: Invalid argument.

I've as yet not been able to find a way to make Edge call dispatchEvent with a custom event on a parent window.