webview

Mocked instance of final class in Spock behaves differently in test and dev code

匆匆过客 提交于 2020-06-09 04:12:53
问题 In my JavaFX application I am using Spock and Groovy for testing. I have dedicated WebBrowserController for taking care of my JavafX WebView component. I wanted to test some functionalities that depend on current Location and Document of the WebView . Relevant part of WebBrowserController: public WebEngine getEngine() { return panel.getWebView().getEngine(); } This is how I create an instance of WebBrowserController for my tests. Notice the GroovyMock I used there - ordinary Mock(...) does

Flutter: Loading an IFrame from WebView

邮差的信 提交于 2020-06-08 05:57:06
问题 I am looking for a way to load an iFrame from Flutter WebView ( webview_flutter: ^0.1.2), and couldn't find any relevant info. Container( child: WebView( initialUrl: 'https://www.youtube.com/embed/abc', javaScriptMode: JavaScriptMode.unrestricted, )), Any idea how to pass IFrame to Webview, will it be as part of initialUrl?, I have tried the same, but it didn't load properly. 回答1: This might do what you want Container( child: WebView( initialUrl: Uri.dataFromString('<html><body><iframe src=

Nativescript webview get cookies on iOS

梦想与她 提交于 2020-05-31 05:04:27
问题 in my Nativescript Angular application, i authenticate to a node.js server using express-session and a nativescript webview. The server sends me back a cookie (connect.sid) containing the sessionid that i will use to access the node.js app. I cannot read the connect.sid cookie in response from the server on iOS. I am currently using NSHTTPCookieStorage.sharedHTTPCookieStorage.cookies, and this contains a connect.sid, but its value is not the right one. I managed to do that on Android using

Nativescript webview get cookies on iOS

不想你离开。 提交于 2020-05-31 05:03:05
问题 in my Nativescript Angular application, i authenticate to a node.js server using express-session and a nativescript webview. The server sends me back a cookie (connect.sid) containing the sessionid that i will use to access the node.js app. I cannot read the connect.sid cookie in response from the server on iOS. I am currently using NSHTTPCookieStorage.sharedHTTPCookieStorage.cookies, and this contains a connect.sid, but its value is not the right one. I managed to do that on Android using

How to retain WebView State in Flutter?

僤鯓⒐⒋嵵緔 提交于 2020-05-31 04:09:05
问题 I have a WebView Page which I want to load using the kf_drawer menu options. When I switch from one page to another the state of my WebView isn't remembered and it reloads every time. This is my code for the Menu page : import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:kelp/bookWB.dart'; import 'package:kelp/profileWebView.dart'; import 'package:kf_drawer/kf_drawer.dart'; import 'classBuilder.dart'; import 'package:kelp/home.dart'; class

How to retain WebView State in Flutter?

不羁岁月 提交于 2020-05-31 04:06:13
问题 I have a WebView Page which I want to load using the kf_drawer menu options. When I switch from one page to another the state of my WebView isn't remembered and it reloads every time. This is my code for the Menu page : import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:kelp/bookWB.dart'; import 'package:kelp/profileWebView.dart'; import 'package:kf_drawer/kf_drawer.dart'; import 'classBuilder.dart'; import 'package:kelp/home.dart'; class

Call Android method from TypeScript

寵の児 提交于 2020-05-29 11:15:33
问题 Android injects a JS interface into a web view: JavaScriptInterface javaScriptInterface = new JavaScriptInterface(this); browser.addJavascriptInterface(javaScriptInterface, "qp"); The interface looks like this: public class JavaScriptInterface { private ILoadEpi iLoadEpi; public JavaScriptInterface(ILoadEpi iLoadEpi) { this.iLoadEpi = iLoadEpi; } @JavascriptInterface public void passParameters(String fldMerchCode, String fldMerchRefNbr, String fldTxnAmt, String fldTxnScAmt, String

Call Android method from TypeScript

房东的猫 提交于 2020-05-29 11:14:11
问题 Android injects a JS interface into a web view: JavaScriptInterface javaScriptInterface = new JavaScriptInterface(this); browser.addJavascriptInterface(javaScriptInterface, "qp"); The interface looks like this: public class JavaScriptInterface { private ILoadEpi iLoadEpi; public JavaScriptInterface(ILoadEpi iLoadEpi) { this.iLoadEpi = iLoadEpi; } @JavascriptInterface public void passParameters(String fldMerchCode, String fldMerchRefNbr, String fldTxnAmt, String fldTxnScAmt, String

How to load an URL inside a WebView using Android Kotlin?

*爱你&永不变心* 提交于 2020-05-26 10:35:19
问题 I am new to both Android and Kotlin. Anyone can help me to load an URL in a webView ? I just want to load the URL and view the webpage when the app is open. 回答1: 1.activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.kotlinwebview.MainActivity">

XAML WebView binding to string not working in Xamarin Forms

﹥>﹥吖頭↗ 提交于 2020-05-26 09:09:45
问题 I'm new to C# and Xamarin Forms. I'm having a webview and getting source url from an API. (For this question , I have hardcode the value). I binded source url instead of adding the value to Source in XAML. But it's not working. There are few solutions in stack and forums. I tried. But didn't work. Someone please help me to sovle this. This is my XAML <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx