代码已经整合进quick-cocos2dx2.2.6里
https://github.com/pppoeuser1/quick-cocos2d-x-2.2.6
用法:
local webview = WebView:create()
webview:loadURL(“http://www.baidu.com”)
webview:setPosition(50,50)
webview.setContentSize(CCSize(200,200))
self:addChild(webview)
webview:setJavascriptInterfaceScheme(“mobilecall”)
webview:setOnJSCallback(function (sender,url)
print(url)
end)