title: How to Invoke JavaScript from Xamarin.Forms app without using Uno.UI?
body: <p>I have a Xamarin.Forms app and it projected to WASM via <a href="https://platform.uno/xamarin-forms/" rel="nofollow noreferrer">Uno Platform</a> . I need open a web link after click or tap. I solve it with:</p>
  
  <pre><code> try // Uwp &amp; iOS &amp; Android
              {
                  await Browser.OpenAsync(new Uri("http://localhost"), BrowserLaunchMode.SystemPreferred); // Open url in-app browser for iOS &amp; Android- native in UWP
              }
              catch (NotImplementedInReferenceAssemblyException ex) //Wasm falls here because lack of Xamarin.Essentials.
              {
                  await DisplayAlert("Hata", "Not supported on WASM", "Anladım"); // Show the info about exception.
  
  
  
              }
  </code></pre>
  
  <p>for Xamarin. Android &amp; iOS and UWP(Windows). However, the Xamarin.Essentials cannot run on WASM yet. So I need to invoke the Javascript and run this code:</p>
  
  <pre><code>function openPage(x) {
      window.open(x);
  }
  </code></pre>
  
  <p>I try to use UNO.Foundation for </p>
  
  <pre><code>WebAssemblyRuntime.InvokeJS("(function(){location.href=\"https://www.wikipedia.com/\";})();");
  </code></pre>
  
  <p>However, it interfere with the UWP UI classes and brokes my project. How can I invoke Javascript from Xamarin.Forms page C# backend without using UNO.Foundation class ? Thanks.</p>