Comments on: v2.2.0 is out https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/ Cross-Domain Messaging made easy Thu, 20 Apr 2017 18:47:42 +0000 hourly 1 https://wordpress.org/?v=4.9.34 By: Ravinderuppala https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-259 Thu, 14 Oct 2010 18:59:00 +0000 http://easyxdm.net/wp/?p=202#comment-259 I am trying to communicate between two windows of different domains. I able to get messages using easyXDM but my problem is — it is able to get the messages from the parent window even if the parent window is closed. so what’s happening in the background? how come my child window getting messages from parent window when it is closed.

]]>
By: Øyvind Sean Kinsey https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-33 Sat, 12 Jun 2010 03:29:43 +0000 http://easyxdm.net/wp/?p=202#comment-33 You need to wait for the onReady method to be called prior to using the Rpc instance. before-onReady queuing is a planned feature.

If you take a look at the numerous examples, a common pattern is to use
…,
onReady: function(){
//the code to execute when ready
rpc.foo(….
},
…

]]>
By: Lebowski https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-32 Sat, 12 Jun 2010 00:50:56 +0000 http://easyxdm.net/wp/?p=202#comment-32 Thanks for helping me out. I tried the code you pasted above, but I'm getting this message now when I try to invoke the RPC: Cannot call method 'postMessage' of undefined. It looks like callerWindow never gets initialized.

]]>
By: Øyvind Sean Kinsey https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-24 Fri, 14 May 2010 11:51:40 +0000 http://easyxdm.net/wp/?p=202#comment-24 In your child window put this:
var rpc = new easyXDM.Rpc(/** The channel configuration*/{
local: “../name.html”
}, /** The configuration */ {
local: {
addNumbers: function(a, b){
return a + b;
}
}
});
And then in the parent window you put
var rpc = new easyXDM.Rpc(/** The channel configuration */{
local: “../name.html”,
remote: REMOTE + “/remotemethods.html”,
remoteHelper: REMOTE + “/../name.html”,
onReady: function(){

}
}, /** The interface configuration */ {
remote: {
addNumbers: {}
}
});

Now, in your parent you can call rpc.addNumbers(1,2,function(result){alert(result);});
Note that you have to wait for the onReady method to be run before you do this.

No reloads are necessary – and you only need these two pages (plus the name.html file if you want to use the window.name transport).

]]>
By: Lebowski https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-23 Fri, 14 May 2010 03:30:12 +0000 http://easyxdm.net/wp/?p=202#comment-23 I have a parent window that opens a child window which is on a different domain. I want to call a simple two-parameter function on the child window from the parent. If they were not on different domains I would simply call child.myFunction(X, Y); in the parent. Alas, this is not allowed by the browser.

I've looked at the xhr example, and I'm not seeing how to tweak it to do what I need. Do I need to post some data to a third page? One of my requirements is that I must not reload the child page mentioned above, as loading that page is very resource-intensive.

]]>
By: Øyvind Sean Kinsey https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-22 Fri, 14 May 2010 03:23:41 +0000 http://easyxdm.net/wp/?p=202#comment-22 But about the separate files, all the samples have separate code for the local and remote end (although it is actually possible to use the same code and thereby end up with a 'duplex' setup).

]]>
By: Øyvind Sean Kinsey https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-21 Fri, 14 May 2010 03:04:17 +0000 http://easyxdm.net/wp/?p=202#comment-21 I can see how it can get a bit confusing 🙂
If you want one of the 'simple' examples, then you can take a look at the xhr sample, this only goes one way and has a single method.
http://consumer.easyxdm.net/current/example/xhr…

]]>
By: Lebowski https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-20 Fri, 14 May 2010 02:59:45 +0000 http://easyxdm.net/wp/?p=202#comment-20 First time user of EasyXDM. I'm trying to do RPC. I've looked over your documentation and examples but I can't seem to make out what is going on. Is there a Hello Word example that uses two separate Javascript files? One for the function caller and one for the function provider? The integrated examples leave my head spinning with the local/remote gymnastics.

]]>
By: Tweets that mention v2.2.0 is out | easyXDM -- Topsy.com https://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/comment-page-1/#comment-11 Wed, 28 Apr 2010 09:31:55 +0000 http://easyxdm.net/wp/?p=202#comment-11 […] This post was mentioned on Twitter by Øyvind Sean Kinsey. Øyvind Sean Kinsey said: #easyXDM v2.2.0 out! http://easyxdm.net/wp/2010/04/21/v2-2-0-is-out/ […]

]]>