title: How to get html content from XWalkView?
body: <p>I have tried I did in WebView using JavaScriptInterface. But it is not working. How to get HTML content from XWalkView?</p>
  
  <p>In this way I could get HTML from WebView:</p>
  
  <pre><code>    public class MainActivity extends AppCompatActivity {
  
      WebView myWebView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          myWebView = (WebView) findViewById(R.id.webView);
          WebSettings webSettings = myWebView.getSettings();
  
          webSettings.setJavaScriptEnabled(true);
  
          myWebView.loadUrl("http://joerichard.net/api/test/generate.htm");
          myWebView.getSettings().setJavaScriptEnabled(true);
          myWebView.addJavascriptInterface(new MyJavaScriptInterface(this), "HtmlViewer");
  
          myWebView.setWebViewClient(new WebViewClient() {
              @Override
              public void onPageFinished(WebView view, String url) {
                  if(url.endsWith("generate.htm")){
                      myWebView.loadUrl("javascript:window.HtmlViewer.showHTML" +
                              "('&lt;html&gt;'+document.getElementsByTagName('html')[0].innerHTML+'&lt;/html&gt;');");
                  }
              }
          });
  
      }
  
      class MyJavaScriptInterface {
  
          private Context ctx;
  
          MyJavaScriptInterface(Context ctx) {
              this.ctx = ctx;
          }
  
          public void showHTML(String html) {
              Document doc = Jsoup.parse(html);
          }
  
      }
  
  }
  </code></pre>
  
  <p>I tried the same for XWalkView but have not succeded. How to get HTML source code from XWalkView?</p>