kiran-jejurkar / jquery-stream

Automatically exported from code.google.com/p/jquery-stream
0 stars 0 forks source link

Stream whose type is ws and dataType is xml fail to receive message #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$.stream("stream", {
    type: "ws",
    dataType: "xml",
    message: function(event, stream) {
        // Never called
    }
});

The stream object throws an error when receiving XML data via WebSocket, 
because it is not possible to init MessageEvent with XML document as data 
attribute in some browsers.

Currently, it fails in Opera, Chrome and Safari and works in Firefox.

Original issue reported on code.google.com by flowersi...@gmail.com on 19 Jun 2011 at 5:02

GoogleCodeExporter commented 9 years ago
It also fails in Firefox4. it converts object data into string when 
initializing MessageEvent.

I think I should provide a plain object instead of a MessageEvent object to 
support data converted into the specific type.

Original comment by flowersi...@gmail.com on 20 Jun 2011 at 2:01

GoogleCodeExporter commented 9 years ago

Original comment by flowersi...@gmail.com on 24 Jun 2011 at 2:36