This is a migrated thread and some comments may be shown as answers.

Using WebView / WebKit to load Websites

2 Answers 120 Views
NativeScript Insiders
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lew
Top achievements
Rank 1
Lew asked on 28 Nov 2014, 09:58 PM
Hello,

I am thinking of building a hybrid app with particular functionality and wanted to know if NativeScript would provide the necessary features.

The app would be a hybrid app, targeted at iOS and Android. It is a shopping-related app, so the requirement is to be able to load and view a Website within the app. I already have a Proxy to get around the same-origin restriction imposed by elements such as <iframe>s, to be able to access Websites from domains other than the apps.

The main question I have is around loading these Websites. What would be the best way to do so: Use a <webview> element in an HTML page, setting the source to the domain I want to view? Or, is it possible to use an <iframe> in the HTML page?

Or, does NativeScript provide some other functionality that would make this feature easier to develop - to be able to load and display a Website in some container or another? This feature needs to be flexible - to have users be able to type the URL of a merchant in an input field, and then have that merchant's Website be displayed (in the <webview>, <iframe>, or something else). No chrome is needed - no back button, navigation, caching, or even history; just the loading and display of the Website.

Please let me know what the best way would be to approach this using NativeScript (assuming of course that it's possible to do so).

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Valio
Top achievements
Rank 1
answered on 01 Dec 2014, 02:08 PM
Hi Lew,

this will be possible with NativeScript. With our 0.42 release in December we will have a simple WebView component which will be able to load external html page.

Greetings!
0
Lew
Top achievements
Rank 1
answered on 01 Dec 2014, 02:21 PM
Thanks!
Tags
NativeScript Insiders
Asked by
Lew
Top achievements
Rank 1
Answers by
Valio
Top achievements
Rank 1
Lew
Top achievements
Rank 1
Share this question
or