I'm trying to leverage SignalR while developing Chrome Extensions. I can run sample successfully but when I try to change the client from webpage to chrome extesion, I got some trouble. I define the connection the same as the sample like below:
var chat = $.connection.myHub;
console.log("start connect");
$.connection.hub.start().done(function () {
// Call the Send method on the hub.
console.log("Test");
//chat.server.send("extension", "start");
chat.server.send("succ");
});
But I always get this error: Uncaught TypeError: Cannot read property 'server' of undefined.
I have already enabled CrossDomain in my server side. Since `chat.server' is invoked, it seems the connection is established successfully. Did I miss adding some files/scripts in my extension folder?