cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naik, Archana" <na...@lab126.com>
Subject Re: Android: recreating plugins when loading url
Date Tue, 25 Feb 2014 00:04:08 GMT
Oh I see. 

Here, by recreating I meant calling pluginManager->init() method.
loadUrl(string url) in CordovaWebView calls loadUrlIntoView(final String
url, boolean recreatePlugins)
With second argument as true. Which does this

if (recreatePlugins) {
  this.url = url;
  this.pluginManager.init();
        }


I am wondering why calling init() here every time we load a new url.

Thanks
Archana


On 2/24/14 3:57 PM, "Joe Bowser" <bowserj@gmail.com> wrote:

>On Mon, Feb 24, 2014 at 3:45 PM, Naik, Archana <naika@lab126.com> wrote:
>> History stack reset? I thought loading url will add to the navigation
>> history.
>>
>
>Which history are we referring to?  We have some old legacy methods
>from the bad old days when we maintained our own history, because we
>thought the browser history was broken (Android 3.x, 4.0.x).
>
>> Yes, overload helps to by pass this recreation but default call is with
>> this flag set to true so internally when you use loadUrl() it will
>> recreate plugins.
>
>We should only create plugins when we invoke them unless we're setting
>plugins to be instantiated onload.  There also could be some security
>reasons to destroy and recreate the plugins, although none are coming
>to mind now.
>
>
>
>>
>> Archana
>>
>> On 2/24/14 11:13 AM, "Andrew Grieve" <agrieve@chromium.org> wrote:
>>
>>>I think the history stack is reset when you use that API, so it somewhat
>>>does make sense to recreate the plugins. Not sure if there is a better
>>>answer than that...
>>>
>>>I added the overload to allow not resetting the plugins, because I think
>>>that is a useful thing to want to do as well.
>>>
>>>
>>>On Fri, Feb 21, 2014 at 5:24 PM, Naik, Archana <naika@lab126.com> wrote:
>>>
>>>> Hi, Devs,
>>>>
>>>> Why do we recreate plugin every time an url is loaded? I am referring
>>>>to
>>>> loadUrlIntoView(url,bool) method.
>>>> Other override which take only string(url), has this recreatePlugins
>>>> boolean as true.
>>>>
>>>> Thanks
>>>> Archana
>>>>
>>


Mime
View raw message