Callback can not be obtained from the Webview in cocos2d-x(v3.10)
<p>I am in learning and trying to app development in the cocos2d-x.
How do I implement a callback from the WebView is?
I have been using the cocos2d-x v3.10.</p>

<p>test_index.html</p>

<pre><code>&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="apple-mobile-web-app-capable" content="yes"&gt;
    &lt;meta name="format-detection" content="telephone=no"&gt;
    &lt;meta name="robots" content="none" /&gt;
    &lt;meta name="viewport" content="width=device-width,height=device-height"&gt;
&lt;/head&gt;

    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script src="js/sp.js"&gt;&lt;/script&gt;
    &lt;ul class="slideshow"&gt;
        &lt;li&gt;
        &lt;a href="#" onclick='sp.call("test1")'&gt;
        &lt;img src="img/test1.jpg" width="100%"/&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;style&gt;
        .bx-default-pager {
            display: none;
        }
        .bx-viewport {
            border: none !important;
        }
    &lt;/style&gt;
&lt;/body&gt;
</code></pre>

<p></p>

<p>sp.js</p>

<pre><code>(function(){
    var sp = {};
    var isAndroid = navigator.userAgent.match(/Android/);
    var isIOs = navigator.userAgent.match(/iPhone/) || navigator.userAgent.match(/iPod/) || navigator.userAgent.match(/iPad/);
    sp.call = function(text){
        if(isAndroid){
            window.Cocos2dx.call(text);
        } else if (isIOs) {
            window.location.href = "cocos2dx:" + text;
        } else {
            window.location.href = text;
        }
    };
    window.sp = sp;
})();
</code></pre>

<p>test.cpp</p>

<pre><code>bool TestScene::init()
{
        auto webView = cocos2d::experimental::ui::WebView::create();
        webView-&gt;loadURL("http://test/test_index.html");
        webview-&gt;setONJSCallback(CC_CALLBACK_1(TestScene::callbackFromJS,this));
        webView-&gt;setAnchorPoint(Point(0,0));
        webView-&gt;setPosition(Point(0,150));
        webView-&gt;setContentSize(Size(WINSIZE.width,WINSIZE.height-150));
        this-&gt;addChild(webView,1);

}

void TestScene::callbackFromJS(cocos2d::experimental::ui::WebView* webview, std::string* url)
{
  log("call this method");
}
</code></pre>

<p>Wrong use of the "setOnJSCallback"? </p>