title: Xamarin locally loading JS script
body: <p>I am very new to Xamarin.
  I am struggling to load a JS file which is embedded in my app.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;iOS WebView&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="default.css" /&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Xamarin.Forms&lt;/h1&gt;
  
  &lt;button onclick="test()"&gt;Test&lt;/button&gt;
  &lt;button onclick="test1()"&gt;Test 1&lt;/button&gt;
  
  &lt;img src="XamarinLogo.png" /&gt;
  
  &lt;script type="text/javascript" src="test.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      function test1() {
          alert('1');
      }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>Function test() is in test.js and it is in the resource folder with default.css and XamarinLogo.png. It is strange because the latter 2 files are loaded.</p>
  
  <p>Clicking the first button never fires the alert but the second one does because the function is in the html.</p>
  
  <p>Any ideas?</p>
  
  <p>Many thanks.</p>