'null' is not an object (evaluating 'X[2]') easyxdm

Skip to first unread message


Feb 26, 2014, 10:20:36 AM2/26/14
to eas...@googlegroups.com
I am getting this error:

'null' is not an object (evaluating 'X[2]') easyxdm

When I try to do this:

<div id="theDiv"></div>
var url = "the url" 
socket = new easyXDM.Socket({
                    remote: url,
                    container: document.getElementById(theDiv),
                    onMessage: app.receiveMessage,
                    onReady : function(){
                        console.log("done making obj");

app.receiveMessage is a custom function. I never see the onReady event message in the console, just the exception.

Here is the weird part. It works fine in a browser but on in a phonegap application it fails.
Just to say, I have no iFrames on the page. 

App info:

PhoneGap 3.3 / JQM 1.4.1 / JQ 1.11.0

Any ideas? Thanks so much!


Øyvind Sean Kinsey

Feb 26, 2014, 3:07:49 PM2/26/14
to easyxdm
It doesn't make sense to use easyXDM in a phonegap app, since there's no Same-Origin Policy applied.

I'm not sure why you're not able to get easyXDM defined, but at some point, the url validation will fail given that the current location is not on http or https.

Øyvind Sean Kinsey
San Francisco, CA

You received this message because you are subscribed to the Google Groups "easyxdm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to easyxdm+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
0 new messages