From 31339d10e5c1de55edf6da5554bbfc0dba090ce4 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Thu, 16 Jan 2014 10:14:47 +0800 Subject: [PATCH] issue #3626:Add the deprecated support for the WebSocket and the XMLHttpRequest in the script --- cocos/scripting/lua/script/DeprecatedClass.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cocos/scripting/lua/script/DeprecatedClass.lua b/cocos/scripting/lua/script/DeprecatedClass.lua index 647d92357c..05e476a6fe 100644 --- a/cocos/scripting/lua/script/DeprecatedClass.lua +++ b/cocos/scripting/lua/script/DeprecatedClass.lua @@ -2154,4 +2154,20 @@ end _G["CCBProxy"] = DeprecatedClass.CCBProxy() --CCBProxy class will be Deprecated,end +--WebSocket class will be Deprecated,begin +function DeprecatedClass.WebSocket() + deprecatedTip("WebSocket","cc.WebSocket") + return cc.WebSocket +end +_G["WebSocket"] = DeprecatedClass.WebSocket() +--WebSocket class will be Deprecated,end + +--XMLHttpRequest class will be Deprecated,begin +function DeprecatedClass.XMLHttpRequest() + deprecatedTip("XMLHttpRequest","cc.XMLHttpRequest") + return cc.XMLHttpRequest +end +_G["XMLHttpRequest"] = DeprecatedClass.XMLHttpRequest() +--XMLHttpRequest class will be Deprecated,end +