Results 1 to 3 of 3
  1.    #1  
    I am loading a webpage into webview using external URL.

    Expected behavior:
    The webview has inner links that are being rendered using javascript loaded with the page. When the user clicks on the video links, the app should launch the player and play the videos.

    current workarounds:
    I added the interrogateClicks:true and was listening to the webViewLinkClicked event. For video links the above solution is working but when I ignore the event for the non-video links, the event is not propagated to the javascript of the loaded page in the webview.
    Defects:
    For video links - single click
    for non-video links - double click to navigate.

    Help:
    Is there a workaround or solution for this problem?
    Can we invoke the javascript on the loaded page in the WebView?
    can we add and listen to the property for the change of value in the webview?

    Any help is greatly appreciated.
  2. #2  
    WebView Methods

    Check the setEnableJavaScript method. I haven't used it yet but it seems that may work with what you are looking for for your second question.
  3. spud101's Avatar
    Posts
    868 Posts
    Global Posts
    876 Global Posts
    #3  
    Can anyone exactly explain how to do this, call a method on a webview widet?

    I'm trying to build an app that loads TVgids .mobi - Dé TV gids mobiel in a webview widget. But I want it to be a webview widet with javascript disabled (if enabled it autoscrolls, which is what I try to "turn off").

    I just started really simple:

    scene:
    Code:
    <div x-mojo-element="WebView" id="TVgids"></div>
    assistant:
    Code:
    GidsAssistant.prototype.setup = function() {
    	/* this function is for setup tasks that have to happen when the scene is first created */
    		
    	/* use Mojo.View.render to render view templates and add them to the scene, if needed */
    	
    	/* setup widgets here */
    	// Instantiate WebView Widget
    	this.controller.setupWidget("TVgids",
    			{ url: "http://tvgids.mobi"},
    			this.TVgidsModel = {
    			}
    	);
    	/* add event handlers to listen to events from widgets */
    };
    And now I want to call setEnableJavaScript(false) on this widget. But since I'm totally new to WebOS development and a javascript novice, I have no clue whatsoever to d this.

    Any help would be very much appreciated

Posting Permissions