title: Android webview refused to execute inline script
body: <p>I'm writing an Android application which host a webview to load a webpage. I got a lot of errors like below in logcat:</p>
  
  <blockquote>
    <p>Refused to execute inline script because it violates the following
    Content Security Policy directive: "default-src 'self'". Note that
    'script-src' was not explicitly set, so 'default-src' is used as a
    fallback.</p>
  </blockquote>
  
  <p>Please note that Javascript is executed well if it's not an inline script.
  For example, with an HTML file like below:</p>
  
  <pre><code>&lt;htnl&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="abc.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
      alert("This is inline script");
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Script in abc.js is executed properly, but the inline script is refused to execute.</p>
  
  <p>I understand that the webview refuses to execute inline Javascript due to "Contect Security Policy". But the webpage need to execute those inline scripts to function properly and I cannot make any change on the webpage.</p>
  
  <p>This problem only KitKat (Android 4.4)</p>
  
  <p>Is there any way to overcome this problem, modify "Content Security Policy" to allow inline script to be executed.</p>