incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: Checking platform + version in cordova-js
Date Thu, 03 May 2012 18:25:01 GMT
Are you saying, seeding the webview with the JS contents before loading
app assets? We could even eliminate the need for having a <script>
reference to cordova.js.

BlackBerry can do that, and I think Drew, in his pure-plugin prototype
[1], implemented that.

Android in theory should be doable by calling loadUrl:<full cordova.js
string here> on-load.

All of this would need testing though. Would be nice!


On 5/3/12 2:08 PM, "Jesse MacFadyen" <> wrote:

>Interesting. Good point in not depending on the bridge.
>Maybe slightly off topic, and a potential breaking change...
>Does it make sense to place the cordova.js file up one level? Ie
>This would make it a packaging issue, and the www folder would be
>truly portable.
>Is this possible on other platforms? I know it would work for WP7 and iOS.
>  Jesse
>Sent from my iPhone5
>On 2012-05-03, at 10:48 AM, Filip Maj <> wrote:
>> Wanted to solicit the list to get help on the issue. Just trying to
>> generate ideas.
>> The core problem: people not using the proper .js file on their
>> I.e. Copying their entire www/ folder from their iOS app to their
>> app.
>> This issue proposes the idea of checking that the native platform the
>> is running on matches the platform the .js file is built for.
>> The question is: how?
>> One idea: could do checking in the device module (the one that returns
>> device info) and compare against the platform id (from platform.js).
>> However, this relies on the web view <-> native bridge working, which
>> probably will not if the user is using the wrong .js file.

View raw message