FAQ

Why do I get the error ‘url is undefined or empty’ when navigating the provider?

Due to security measures in place (this is for your own, and your users protection) the provider can not be navigated without severing the connection, and this cannot be re-established. If you require the need to navigate the content displayed in the iframe then you should use a nested approach, with the provider containing an iframe with full width/height which the user interacts with. As long as these two documents are on the same domain then these can communicate freely and the inner document can access the parents easyXDM object at will.

When I set cookies in my provider, why are they not persisted?

This is most likely due to a lack of P3P policy – this will cause browsers like IE and Safari to treat documents in iframes originating at a different domain from the main page as third-party content, and will require a suitable P3P policy in order to persist cookies.

In IE 6-8, when passing callbacks to an easyXDM object in `window.opener` then these are treated as objects instead of as functions

In IE `typeof fn` where fn is a Function created in a different window will return `object` instead of `function`. To work around this issue you can wrap such callbacks in a function from the ‘correct’ window by using placing the following code in the opening window

window.proxyCall  = (function() {
    var context = this; // store the context for the fallback
    return function(fn) { // return a function closuring the context variable
        return function() { // return a Function object from this context wrapping the otherwise unrecognizable Function from the other context
            fn.apply(context, arguments);
        };
    };
})();

and then calling `procyCall` in the opened window

window.opener.easyXDMobj.foo(bar, window.opener.proxyCall(function() {
  //
}));