Android Webview - Uncaught ReferenceError in local javascript execution












1














Hello everyone and thanks for your help!



I want to build a Android Webview App, it uses HTML + CSS + javascript with no library except the highcharts one. It works perfectly well cross-browser when I try it with the files on the server.



I want to have as many files as possible running locally client-side: the HTML, CSS, all assets (images) and javascript codes are in the app, leaving only the php files on the server (login, signin, etc.).



Unfortunately, when I try my app on Android, I get errors on my javascript function defeinitions, for instance:
12-27 10:04:42.075 17798-17798/com.wifcompanion.wifcompanion D/WiFCompanionConsole: Uncaught ReferenceError: BodyReset is not defined -- From line 22 of file:///android_asset/wifmobile.html



My first intuition was that the .js files were not loaded properly. So I put all the js code directly under the tag in wifmobile.html. To no avail.



What's more, it seems some functions are found (for instance NewSignIn() when I click on the front-page login button), while others are not (for instance PopupSave(), which is a function called in NewSignIn()).



The closest question I could find on stackoverflow is here, but does not have any answer:
JavaScript not working with android WebView, Uncaught ReferenceError



MainActivity:



package com.wifcompanion.wifcompanion;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.annotation.TargetApi;
import android.util.Log;
import android.webkit.ConsoleMessage;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {
private WebView m_webview = null;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Load layout
setContentView(R.layout.activity_main);

// Create WebView
m_webview = new WebView(this);

// Add WebView to Activity
m_webview = (WebView) findViewById(R.id.webviewWIF);
m_webview.setWebChromeClient(new WebChromeClient());
m_webview.loadUrl("file:///android_asset/wifmobile.html");

//Logcat and console
m_webview.setWebChromeClient(new WebChromeClient() {
public boolean onConsoleMessage(ConsoleMessage cm) {
Log.d("WiFCompanionConsole", cm.message() + " -- From line "
+ cm.lineNumber() + " of "
+ cm.sourceId() );
return true;
}
});


// Reload the old WebView content
if (savedInstanceState != null) {
m_webview.restoreState(savedInstanceState);
}
// Create the WebView
else {
m_webview.getSettings().setJavaScriptEnabled(true);
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
fixNewAndroid(m_webview);
}
}
}

// Save the state of the web view when the screen is rotated.
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
m_webview.saveState(outState);
}

@TargetApi(16)
protected void fixNewAndroid(WebView webView) {
try {
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
} catch (NullPointerException e) {
}
}


}



wifmobile.html



<!DOCTYPE html>
<html>
<head>
<!-- Title -->
<title>World in Flames Companion</title>

<!-- Include meta tag to ensure proper rendering and touch zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="manifest.json">
<!-- icon -->
<link rel="icon" href="img/icon/favicon.ico" />
<link rel="icon" type="image/png" href="img/icon/wiflogo48.png" />
<!-- jQuery library -->
<!--<script src="js/jquery-1.11.1.min.js"></script>-->
<!-- Highharts -->
<script src="https://code.highcharts.com/highcharts.js"></script>
<!-- WIF scripts -->
<script src="solifnav.js"></script>
<script src="solif.js"></script>
<script src="soliffal.js"></script>
<script src="solifsetup.js"></script>
<script src="solifpartisans.js"></script>
<script src="solifflow.js"></script>
<script src="solifcards.js"></script>
<script src="solifdiplo.js"></script>
<script src="solifbenefits.js"></script>
<script src="solifvichy.js"></script>
<script src="solifinternal.js"></script>
<script src="solifgamemanagement.js"></script>
<script src="solifbuild.js"></script>
<script src="solifhelper.js"></script>
<script src="solifdatabase.js"></script>
<script src="solifintel.js"></script>
<script src="solifstats.js"></script>
<script src="solifcivilwar.js"></script>
<script src="solifvp.js"></script>
<!-- Scenario specifics -->
<script src="solifscenario4.js"></script>
<!-- Stylehseet -->
<link rel="stylesheet" href="wifmobile.css">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Anton|Russo+One|Fanwood+Text|UnifrakturCook:700" rel="stylesheet">
</head>
<body onclick="BodyReset(event);" onkeydown="BodyKeydown(event);">
<!-- Login / registration / forgotpassword page-->
<div id="signin">
<div class="banner"><img src="img/icon/wiflogo.png" style="max-width:75%;" /></div>
<div id="login">
<input type="text" name="login-username" id="login-username" placeholder="User name" autocomplete="username">
<input type="password" name="login-password" id="login-password" placeholder="Password" autocomplete="current-password">
<a onclick="NewSignIn();" id="NewSignInButton">Login</a>
<a onclick="GotoRegister();" class="things">&gt;&gt; Register</a>
<a onclick="GotoForgot();" class="things">&gt;&gt; Forgot your password?</a>
</div>
</div>
</body>
</html>`









share|improve this question









New contributor




Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1














    Hello everyone and thanks for your help!



    I want to build a Android Webview App, it uses HTML + CSS + javascript with no library except the highcharts one. It works perfectly well cross-browser when I try it with the files on the server.



    I want to have as many files as possible running locally client-side: the HTML, CSS, all assets (images) and javascript codes are in the app, leaving only the php files on the server (login, signin, etc.).



    Unfortunately, when I try my app on Android, I get errors on my javascript function defeinitions, for instance:
    12-27 10:04:42.075 17798-17798/com.wifcompanion.wifcompanion D/WiFCompanionConsole: Uncaught ReferenceError: BodyReset is not defined -- From line 22 of file:///android_asset/wifmobile.html



    My first intuition was that the .js files were not loaded properly. So I put all the js code directly under the tag in wifmobile.html. To no avail.



    What's more, it seems some functions are found (for instance NewSignIn() when I click on the front-page login button), while others are not (for instance PopupSave(), which is a function called in NewSignIn()).



    The closest question I could find on stackoverflow is here, but does not have any answer:
    JavaScript not working with android WebView, Uncaught ReferenceError



    MainActivity:



    package com.wifcompanion.wifcompanion;

    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.annotation.TargetApi;
    import android.util.Log;
    import android.webkit.ConsoleMessage;
    import android.webkit.WebChromeClient;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;

    public class MainActivity extends AppCompatActivity {
    private WebView m_webview = null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Load layout
    setContentView(R.layout.activity_main);

    // Create WebView
    m_webview = new WebView(this);

    // Add WebView to Activity
    m_webview = (WebView) findViewById(R.id.webviewWIF);
    m_webview.setWebChromeClient(new WebChromeClient());
    m_webview.loadUrl("file:///android_asset/wifmobile.html");

    //Logcat and console
    m_webview.setWebChromeClient(new WebChromeClient() {
    public boolean onConsoleMessage(ConsoleMessage cm) {
    Log.d("WiFCompanionConsole", cm.message() + " -- From line "
    + cm.lineNumber() + " of "
    + cm.sourceId() );
    return true;
    }
    });


    // Reload the old WebView content
    if (savedInstanceState != null) {
    m_webview.restoreState(savedInstanceState);
    }
    // Create the WebView
    else {
    m_webview.getSettings().setJavaScriptEnabled(true);
    int currentapiVersion = android.os.Build.VERSION.SDK_INT;
    if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
    fixNewAndroid(m_webview);
    }
    }
    }

    // Save the state of the web view when the screen is rotated.
    @Override
    protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    m_webview.saveState(outState);
    }

    @TargetApi(16)
    protected void fixNewAndroid(WebView webView) {
    try {
    webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
    } catch (NullPointerException e) {
    }
    }


    }



    wifmobile.html



    <!DOCTYPE html>
    <html>
    <head>
    <!-- Title -->
    <title>World in Flames Companion</title>

    <!-- Include meta tag to ensure proper rendering and touch zooming -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="manifest" href="manifest.json">
    <!-- icon -->
    <link rel="icon" href="img/icon/favicon.ico" />
    <link rel="icon" type="image/png" href="img/icon/wiflogo48.png" />
    <!-- jQuery library -->
    <!--<script src="js/jquery-1.11.1.min.js"></script>-->
    <!-- Highharts -->
    <script src="https://code.highcharts.com/highcharts.js"></script>
    <!-- WIF scripts -->
    <script src="solifnav.js"></script>
    <script src="solif.js"></script>
    <script src="soliffal.js"></script>
    <script src="solifsetup.js"></script>
    <script src="solifpartisans.js"></script>
    <script src="solifflow.js"></script>
    <script src="solifcards.js"></script>
    <script src="solifdiplo.js"></script>
    <script src="solifbenefits.js"></script>
    <script src="solifvichy.js"></script>
    <script src="solifinternal.js"></script>
    <script src="solifgamemanagement.js"></script>
    <script src="solifbuild.js"></script>
    <script src="solifhelper.js"></script>
    <script src="solifdatabase.js"></script>
    <script src="solifintel.js"></script>
    <script src="solifstats.js"></script>
    <script src="solifcivilwar.js"></script>
    <script src="solifvp.js"></script>
    <!-- Scenario specifics -->
    <script src="solifscenario4.js"></script>
    <!-- Stylehseet -->
    <link rel="stylesheet" href="wifmobile.css">
    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Anton|Russo+One|Fanwood+Text|UnifrakturCook:700" rel="stylesheet">
    </head>
    <body onclick="BodyReset(event);" onkeydown="BodyKeydown(event);">
    <!-- Login / registration / forgotpassword page-->
    <div id="signin">
    <div class="banner"><img src="img/icon/wiflogo.png" style="max-width:75%;" /></div>
    <div id="login">
    <input type="text" name="login-username" id="login-username" placeholder="User name" autocomplete="username">
    <input type="password" name="login-password" id="login-password" placeholder="Password" autocomplete="current-password">
    <a onclick="NewSignIn();" id="NewSignInButton">Login</a>
    <a onclick="GotoRegister();" class="things">&gt;&gt; Register</a>
    <a onclick="GotoForgot();" class="things">&gt;&gt; Forgot your password?</a>
    </div>
    </div>
    </body>
    </html>`









    share|improve this question









    New contributor




    Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1







      Hello everyone and thanks for your help!



      I want to build a Android Webview App, it uses HTML + CSS + javascript with no library except the highcharts one. It works perfectly well cross-browser when I try it with the files on the server.



      I want to have as many files as possible running locally client-side: the HTML, CSS, all assets (images) and javascript codes are in the app, leaving only the php files on the server (login, signin, etc.).



      Unfortunately, when I try my app on Android, I get errors on my javascript function defeinitions, for instance:
      12-27 10:04:42.075 17798-17798/com.wifcompanion.wifcompanion D/WiFCompanionConsole: Uncaught ReferenceError: BodyReset is not defined -- From line 22 of file:///android_asset/wifmobile.html



      My first intuition was that the .js files were not loaded properly. So I put all the js code directly under the tag in wifmobile.html. To no avail.



      What's more, it seems some functions are found (for instance NewSignIn() when I click on the front-page login button), while others are not (for instance PopupSave(), which is a function called in NewSignIn()).



      The closest question I could find on stackoverflow is here, but does not have any answer:
      JavaScript not working with android WebView, Uncaught ReferenceError



      MainActivity:



      package com.wifcompanion.wifcompanion;

      import android.support.v7.app.AppCompatActivity;
      import android.os.Bundle;
      import android.annotation.TargetApi;
      import android.util.Log;
      import android.webkit.ConsoleMessage;
      import android.webkit.WebChromeClient;
      import android.webkit.WebView;
      import android.webkit.WebViewClient;

      public class MainActivity extends AppCompatActivity {
      private WebView m_webview = null;

      @Override
      public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      // Load layout
      setContentView(R.layout.activity_main);

      // Create WebView
      m_webview = new WebView(this);

      // Add WebView to Activity
      m_webview = (WebView) findViewById(R.id.webviewWIF);
      m_webview.setWebChromeClient(new WebChromeClient());
      m_webview.loadUrl("file:///android_asset/wifmobile.html");

      //Logcat and console
      m_webview.setWebChromeClient(new WebChromeClient() {
      public boolean onConsoleMessage(ConsoleMessage cm) {
      Log.d("WiFCompanionConsole", cm.message() + " -- From line "
      + cm.lineNumber() + " of "
      + cm.sourceId() );
      return true;
      }
      });


      // Reload the old WebView content
      if (savedInstanceState != null) {
      m_webview.restoreState(savedInstanceState);
      }
      // Create the WebView
      else {
      m_webview.getSettings().setJavaScriptEnabled(true);
      int currentapiVersion = android.os.Build.VERSION.SDK_INT;
      if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
      fixNewAndroid(m_webview);
      }
      }
      }

      // Save the state of the web view when the screen is rotated.
      @Override
      protected void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
      m_webview.saveState(outState);
      }

      @TargetApi(16)
      protected void fixNewAndroid(WebView webView) {
      try {
      webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
      } catch (NullPointerException e) {
      }
      }


      }



      wifmobile.html



      <!DOCTYPE html>
      <html>
      <head>
      <!-- Title -->
      <title>World in Flames Companion</title>

      <!-- Include meta tag to ensure proper rendering and touch zooming -->
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="manifest" href="manifest.json">
      <!-- icon -->
      <link rel="icon" href="img/icon/favicon.ico" />
      <link rel="icon" type="image/png" href="img/icon/wiflogo48.png" />
      <!-- jQuery library -->
      <!--<script src="js/jquery-1.11.1.min.js"></script>-->
      <!-- Highharts -->
      <script src="https://code.highcharts.com/highcharts.js"></script>
      <!-- WIF scripts -->
      <script src="solifnav.js"></script>
      <script src="solif.js"></script>
      <script src="soliffal.js"></script>
      <script src="solifsetup.js"></script>
      <script src="solifpartisans.js"></script>
      <script src="solifflow.js"></script>
      <script src="solifcards.js"></script>
      <script src="solifdiplo.js"></script>
      <script src="solifbenefits.js"></script>
      <script src="solifvichy.js"></script>
      <script src="solifinternal.js"></script>
      <script src="solifgamemanagement.js"></script>
      <script src="solifbuild.js"></script>
      <script src="solifhelper.js"></script>
      <script src="solifdatabase.js"></script>
      <script src="solifintel.js"></script>
      <script src="solifstats.js"></script>
      <script src="solifcivilwar.js"></script>
      <script src="solifvp.js"></script>
      <!-- Scenario specifics -->
      <script src="solifscenario4.js"></script>
      <!-- Stylehseet -->
      <link rel="stylesheet" href="wifmobile.css">
      <!-- Fonts -->
      <link href="https://fonts.googleapis.com/css?family=Anton|Russo+One|Fanwood+Text|UnifrakturCook:700" rel="stylesheet">
      </head>
      <body onclick="BodyReset(event);" onkeydown="BodyKeydown(event);">
      <!-- Login / registration / forgotpassword page-->
      <div id="signin">
      <div class="banner"><img src="img/icon/wiflogo.png" style="max-width:75%;" /></div>
      <div id="login">
      <input type="text" name="login-username" id="login-username" placeholder="User name" autocomplete="username">
      <input type="password" name="login-password" id="login-password" placeholder="Password" autocomplete="current-password">
      <a onclick="NewSignIn();" id="NewSignInButton">Login</a>
      <a onclick="GotoRegister();" class="things">&gt;&gt; Register</a>
      <a onclick="GotoForgot();" class="things">&gt;&gt; Forgot your password?</a>
      </div>
      </div>
      </body>
      </html>`









      share|improve this question









      New contributor




      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Hello everyone and thanks for your help!



      I want to build a Android Webview App, it uses HTML + CSS + javascript with no library except the highcharts one. It works perfectly well cross-browser when I try it with the files on the server.



      I want to have as many files as possible running locally client-side: the HTML, CSS, all assets (images) and javascript codes are in the app, leaving only the php files on the server (login, signin, etc.).



      Unfortunately, when I try my app on Android, I get errors on my javascript function defeinitions, for instance:
      12-27 10:04:42.075 17798-17798/com.wifcompanion.wifcompanion D/WiFCompanionConsole: Uncaught ReferenceError: BodyReset is not defined -- From line 22 of file:///android_asset/wifmobile.html



      My first intuition was that the .js files were not loaded properly. So I put all the js code directly under the tag in wifmobile.html. To no avail.



      What's more, it seems some functions are found (for instance NewSignIn() when I click on the front-page login button), while others are not (for instance PopupSave(), which is a function called in NewSignIn()).



      The closest question I could find on stackoverflow is here, but does not have any answer:
      JavaScript not working with android WebView, Uncaught ReferenceError



      MainActivity:



      package com.wifcompanion.wifcompanion;

      import android.support.v7.app.AppCompatActivity;
      import android.os.Bundle;
      import android.annotation.TargetApi;
      import android.util.Log;
      import android.webkit.ConsoleMessage;
      import android.webkit.WebChromeClient;
      import android.webkit.WebView;
      import android.webkit.WebViewClient;

      public class MainActivity extends AppCompatActivity {
      private WebView m_webview = null;

      @Override
      public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      // Load layout
      setContentView(R.layout.activity_main);

      // Create WebView
      m_webview = new WebView(this);

      // Add WebView to Activity
      m_webview = (WebView) findViewById(R.id.webviewWIF);
      m_webview.setWebChromeClient(new WebChromeClient());
      m_webview.loadUrl("file:///android_asset/wifmobile.html");

      //Logcat and console
      m_webview.setWebChromeClient(new WebChromeClient() {
      public boolean onConsoleMessage(ConsoleMessage cm) {
      Log.d("WiFCompanionConsole", cm.message() + " -- From line "
      + cm.lineNumber() + " of "
      + cm.sourceId() );
      return true;
      }
      });


      // Reload the old WebView content
      if (savedInstanceState != null) {
      m_webview.restoreState(savedInstanceState);
      }
      // Create the WebView
      else {
      m_webview.getSettings().setJavaScriptEnabled(true);
      int currentapiVersion = android.os.Build.VERSION.SDK_INT;
      if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
      fixNewAndroid(m_webview);
      }
      }
      }

      // Save the state of the web view when the screen is rotated.
      @Override
      protected void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
      m_webview.saveState(outState);
      }

      @TargetApi(16)
      protected void fixNewAndroid(WebView webView) {
      try {
      webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
      } catch (NullPointerException e) {
      }
      }


      }



      wifmobile.html



      <!DOCTYPE html>
      <html>
      <head>
      <!-- Title -->
      <title>World in Flames Companion</title>

      <!-- Include meta tag to ensure proper rendering and touch zooming -->
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="manifest" href="manifest.json">
      <!-- icon -->
      <link rel="icon" href="img/icon/favicon.ico" />
      <link rel="icon" type="image/png" href="img/icon/wiflogo48.png" />
      <!-- jQuery library -->
      <!--<script src="js/jquery-1.11.1.min.js"></script>-->
      <!-- Highharts -->
      <script src="https://code.highcharts.com/highcharts.js"></script>
      <!-- WIF scripts -->
      <script src="solifnav.js"></script>
      <script src="solif.js"></script>
      <script src="soliffal.js"></script>
      <script src="solifsetup.js"></script>
      <script src="solifpartisans.js"></script>
      <script src="solifflow.js"></script>
      <script src="solifcards.js"></script>
      <script src="solifdiplo.js"></script>
      <script src="solifbenefits.js"></script>
      <script src="solifvichy.js"></script>
      <script src="solifinternal.js"></script>
      <script src="solifgamemanagement.js"></script>
      <script src="solifbuild.js"></script>
      <script src="solifhelper.js"></script>
      <script src="solifdatabase.js"></script>
      <script src="solifintel.js"></script>
      <script src="solifstats.js"></script>
      <script src="solifcivilwar.js"></script>
      <script src="solifvp.js"></script>
      <!-- Scenario specifics -->
      <script src="solifscenario4.js"></script>
      <!-- Stylehseet -->
      <link rel="stylesheet" href="wifmobile.css">
      <!-- Fonts -->
      <link href="https://fonts.googleapis.com/css?family=Anton|Russo+One|Fanwood+Text|UnifrakturCook:700" rel="stylesheet">
      </head>
      <body onclick="BodyReset(event);" onkeydown="BodyKeydown(event);">
      <!-- Login / registration / forgotpassword page-->
      <div id="signin">
      <div class="banner"><img src="img/icon/wiflogo.png" style="max-width:75%;" /></div>
      <div id="login">
      <input type="text" name="login-username" id="login-username" placeholder="User name" autocomplete="username">
      <input type="password" name="login-password" id="login-password" placeholder="Password" autocomplete="current-password">
      <a onclick="NewSignIn();" id="NewSignInButton">Login</a>
      <a onclick="GotoRegister();" class="things">&gt;&gt; Register</a>
      <a onclick="GotoForgot();" class="things">&gt;&gt; Forgot your password?</a>
      </div>
      </div>
      </body>
      </html>`






      javascript android-activity android-webview






      share|improve this question









      New contributor




      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 21 hours ago





















      New contributor




      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 22 hours ago









      Mathieu Martin

      62




      62




      New contributor




      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Mathieu Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Mathieu Martin is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53942690%2fandroid-webview-uncaught-referenceerror-in-local-javascript-execution%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Mathieu Martin is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Mathieu Martin is a new contributor. Be nice, and check out our Code of Conduct.













          Mathieu Martin is a new contributor. Be nice, and check out our Code of Conduct.












          Mathieu Martin is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53942690%2fandroid-webview-uncaught-referenceerror-in-local-javascript-execution%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas