質問

I'm developing an app with Cordova 3.1.0 + inAppBrowswer plugin + js/css injection.

I'd like a feature to record some activity such as scroll-position on the referenced inAppBrowswer, so that the reopened page automatically scrolls to the recorded position.

Is there any way to do that?

Or, somehow webSocket server and client to communicate between phonegap app side and inAppBrowser app side can do the job, but so far I'm not willing to go that deep.

役に立ちましたか?

解決

    iab1 = window.open('http://foobar.com', '_blank', 'location=no');
    iab1.addEventListener('loadstop', function(event)
    {
        iab1.executeScript(
        {
            code: " var t = window.localStorage.getItem('test');alert(t);window.localStorage.setItem('test', '9999');"

        }, function()
        {
            alert("done");
        });
    });

ok this test code works as expected.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top