webview

How to detect click on `<div>` element contained in a WebView control on Visual Studio 2019?

大兔子大兔子 提交于 2021-01-29 06:04:13
问题 I want to use .Net WebView control in a WinForm to display Unicode characters greater than 0xFFFF. I have created following prototyp VB.Net program to load an HTML page containing Javascript and CSS Style. Dim sText As XElement = <html> <head> <style type="text/css"> .unicode { font-size: 32px; cursor: pointer; } </style> </head> <body> <script type='text/javascript'> function clickUnicode() { var sValue = this.event.srcElement.innerText alert('Click on Unicode character:' + sValue); } <

Xamarin Webview with form scrolls out of view when clicking textbox

一个人想着一个人 提交于 2021-01-29 02:00:52
问题 Using a webview to load a simple html form, the form displays ok. When clicking an input field the entire form disappears showing arrows up and down and done button at bottom part of display. This behavior does not happen in a normal Chrome browser. Any idéas? Best regards Andreas Xaml: <WebView Grid.Row="0" IsEnabled="false" x:Name="webview" Navigating="webViewNavigating"></WebView> </Grid> </ContentPage.Content> <ContentPage.ToolbarItems> <ToolbarItem Text="Byt Betalsätt" Activated="BtnBack

Xamarin Webview with form scrolls out of view when clicking textbox

和自甴很熟 提交于 2021-01-29 01:59:03
问题 Using a webview to load a simple html form, the form displays ok. When clicking an input field the entire form disappears showing arrows up and down and done button at bottom part of display. This behavior does not happen in a normal Chrome browser. Any idéas? Best regards Andreas Xaml: <WebView Grid.Row="0" IsEnabled="false" x:Name="webview" Navigating="webViewNavigating"></WebView> </Grid> </ContentPage.Content> <ContentPage.ToolbarItems> <ToolbarItem Text="Byt Betalsätt" Activated="BtnBack

Monodroid WebView Loading SSL page

你离开我真会死。 提交于 2021-01-28 21:48:47
问题 I have tried loading a WebView with a SSL page, and I am getting an error. Code and error below. I have set my permissions to allow Internet access. I think this is a Mono-only issue. When I try my SSL web page in the default browser it works fine. WebView webView = new WebView(this); string website = "https://..."; webView.Settings.JavaScriptEnabled = true; webView.SetWebViewClient(new WebViewClientAuthentication()); webView.LoadUrl(website); //definition for WebViewClientAuthentication

Xamarin WebView - Call C# Method

北城余情 提交于 2021-01-28 18:17:09
问题 Is there a way in Xamarin's WebView that allows me to attach javascript events to my html elements and call C# method. I could easily do this in Android by using JavaScriptInterface <video width="320" height="240" controls="controls" poster='poster.gif' onclick="window.JSInterface.startVideo('file:///sdcard/test.3gp');" How would I manage to this in Xamarin 回答1: Create a JavaScript Interface Class Create a C# class that contains methods to be called from JavaScript. If you are targeting

removing headers and footers in android webview

此生再无相见时 提交于 2021-01-28 08:52:57
问题 I am trying to load a responsive webpage in a webview component. But I would like to strip the header and footer of the webpage and load the webview with just the body of the webpage. How can this be achieved in an android webview. <div class="header-container"> <header class="header clearfix" ng-include="'/modules/core/homepage/header-partial.html'"></header> </div> 回答1: I was able to remove the header and footer and load the webpage using loadDataWithBaseURL() method Document document =

NativeScript WebView open url in default browser

半腔热情 提交于 2021-01-28 08:02:52
问题 I am trying to build app with WebView and click/tap events on URL-s inside WebView. Solution below opens external browser and URL but it loads same url content in webview as well. Is there a way to prevent loading new url inside webview? Here is my code sample. function onWebViewLoaded(webargs) { const page = webargs.object.page; const vm = page.bindingContext; const webview = webargs.object; webview.on(webViewModule.WebView.loadFinishedEvent, (args) => { let message = "Loading in progress...

Swift WKWebView continuous spell checking

牧云@^-^@ 提交于 2021-01-28 07:21:46
问题 We have an embedded HTML form type editor in a macOS app that needs to be filled by the user. We are using WKWebView with Swift and it's all working fine but we are not able to get the spell check working in WKWebView. I mean it does work and corrects some words but doesn't show red dotted underline on misspelled words like WebView. WebView shows dotted redline where WKWebView does not. Found that WebView has property as isContinuousSpellCheckingEnabled but no such property is available in

Android Webview Strategy For Deleting Images Causing Speech-To-Text to Fail

◇◆丶佛笑我妖孽 提交于 2021-01-28 07:07:28
问题 Problem: Can't delete image in contenteditable div on Android Only known solution at the moment: Android: Backspace in WebView/BaseInputConnection Problem with solution: Setting: creating a BaseInputConnection using the regular constructor seems to disable speech to text from functioning correctly. as opposed to using WebView.onCreateInputConnection(EditorInfo) to generate an InputConnection. any ideas how to remedy this? 回答1: I had the same issue also with text completion using SwiftKey. In

Firebase in Cordova/Phonegap: Log in using Email/Password from within app?

心已入冬 提交于 2021-01-28 06:11:02
问题 I'm running a webview from a cordova app and want to authenticate a user, I know they have the OAuth strategies but I need to use the email/password combination. I'd like to keep things simple but may end up having to generate a token. Open an InAppBrowser that loads an auth flow for firebase Listen for that auth flow to be completed using this method: http://blogs.telerik.com/appbuilder/posts/13-12-23/cross-window-communication-with-cordova%27s-inappbrowser Grab the result from the webview