mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #1010 from knoxHuang/master
Uniform SocketIO emit interfaces parameter for fireball/issues/3872
This commit is contained in:
@@ -198,6 +198,14 @@ if (window.SocketIO) {
|
||||
window.io = window.SocketIO;
|
||||
}
|
||||
|
||||
SocketIO.prototype._jsbEmit = SocketIO.prototype.emit;
|
||||
SocketIO.prototype.emit = function (uri, delegate) {
|
||||
if (typeof delegate === 'object') {
|
||||
delegate = JSON.stringify(delegate);
|
||||
}
|
||||
this._jsbEmit(uri, delegate);
|
||||
};
|
||||
|
||||
// ccsg
|
||||
window._ccsg = {
|
||||
Node: cc.Node,
|
||||
|
||||
Reference in New Issue
Block a user