issue #3626:Add the deprecated support for the WebSocket and the XMLHttpRequest in the script

This commit is contained in:
samuele3hu 2014-01-16 10:14:47 +08:00
parent d49e28610b
commit 31339d10e5
1 changed files with 16 additions and 0 deletions

View File

@ -2154,4 +2154,20 @@ end
_G["CCBProxy"] = DeprecatedClass.CCBProxy() _G["CCBProxy"] = DeprecatedClass.CCBProxy()
--CCBProxy class will be Deprecated,end --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