Using WebView / WebKit to load Websites

3 posts, 1 answers
  1. Lew
    Lew avatar
    2 posts
    Member since:
    Apr 2014

    Posted 28 Nov 2014 Link to this post

    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. Answer
    Valio
    Valio avatar
    102 posts
    Member since:
    Jun 2006

    Posted 01 Dec 2014 in reply to Lew Link to this post

    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!
  3. Lew
    Lew avatar
    2 posts
    Member since:
    Apr 2014

    Posted 01 Dec 2014 in reply to Valio Link to this post

    Thanks!
Back to Top