0 Replies Latest reply on Nov 7, 2013 1:05 PM by Nicolas Hinze

    Rho::WebView.executeJavascript very slow in WP8 Emulator

    Nicolas Hinze

      I'm trying to use "Rho::WebView.executeJavascript" in a callback controller action. It takes almost 20 seconds for the popup to show on the WP8 Emulator with Rhomobile 4. What I'm doing is that I want some javascript to be executed when I press a button on the toolbar.

       

      Controller code that setups up the Native Toolbar:

       

        def index

       

              toolbar = [

            {:action => 'callback:/app/Startup/transition?page=' + url_for(:action => :show_js)',

             :icon   => '/public/images/info.png'}

          ]

         

          Rho::NativeToolbar.create(:buttons => toolbar, :background_color => 0x000000)   

       

        end

       

        def show_js

          Rho::WebView.executeJavascript("alert('This is Webview.executejavascript function');")

        end

       

      -----------------

       

      When pressing the button on the NativeToolbar, it takes about 20 seconds for the popup to show.

       

      Anybody knows why?

       

      Thanks,

       

      Nick,