Questions tagged webkit

Explore the latest questions and answers asked by our top developers.

Swift WebKit Picture in Picture

How can you enable Picture-in-Picture on a Swift WebView from WebKit? At the moment, when you watch a video in a webView and switch to the home screen, you briefly see the picture-in-picture view in the top right on the home screen, but it disappears after a second. How can you retain it so it […]

By Ryan
Published
Categorised as picture-in-picture, swift, webkit, webview Tagged , , ,

Safe area insets (e.g. safe-area-inset-bottom) ignore Safari ‘Aa’ zoom level?

We have the following code adding safe area height to a bottom toolbar so the iOS home bar doesn’t appear over the top of the bottom toolbar icons. /* Extra bottom padding for iPhoneX and iPad Pro Home bar */ @supports (padding: constant(safe-area-inset-bottom)) { .dvFooterContainer1 { –safe-area-inset-bottom: constant(safe-area-inset-bottom); height: calc(var(–safe-area-inset-bottom) + 56px); } } @supports […]

By user1946932
Published
Categorised as css, ios, javascript, safari, webkit Tagged , , , ,

Set UIContextMenu for WKWebView links

How can we set a custom context menu for links within WKWebView? You can set the context menu on an item by doing something like this: let interaction = UIContextMenuInteraction(delegate: self) someItem.addInteraction(interaction) and adding the UIContextMenuInteractionDelegate delegate: func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? { let configuration = UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { […]

By Ryan
Published
Categorised as contextmenu, swift, webkit, wkwebview Tagged , , ,

How to stop JavaScriptCore JSContext evaluating by force on iOS?

Sometime the script being evaluated should be stopped by force, but I can’t find a way to achieve this. Someone pointed out JSContextGroupSetExecutionTimeLimit might work, but It doesn’t in my testing, can anyone help? Another reference: https://github.com/phoboslab/JavaScriptCore-iOS/issues/14 My code: int extendTerminateCallbackCalled = 0; static bool extendTerminateCallback(JSContextRef ctx, void *context) { extendTerminateCallbackCalled++; if (extendTerminateCallbackCalled == 2) […]

By Suge
Published
Categorised as ios, javascriptcore, jscontext, objective-c, webkit

iOS WKWebView – WKURLSchemeHandler crash on posting body (EXC_BAD_ACCESS)

I use my custom WKURLSchemeHandler to intercept resource requests from WKWebView. It works for GET requests, but crashes on some POST requests. Prerequisites: set WKURLSchemeHandler to WKWebView like this let config = WKWebViewConfiguration() config.setURLSchemeHandler(WKURLSchemeHandlerImplementedClass(), forURLScheme: CUSTOM_SCHEME) let webView = WKWebView(frame: CGRect.init(x: 0, y: 0, width: self.webViewContainer.frame.width, height: self.webViewContainer.frame.height), configuration: config) Procedures: 1. Load URL where […]

By THon
Published
Categorised as ios, webkit

CSS: Disable bouce effect for scroll on iOS 13

In the iOS 13 release notes it is stated that there is no longer the need to apply the following to an element to enable the bounce scroll effect: div{ overflow-x: scroll; -webkit-overflow-scrolling: touch; /* No longer needed */ } As I found out from this article: https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes. However, I can now no longer DISABLE […]

By Ood
Published
Categorised as css, html, ios, scroll, webkit

CSS: Disable bounce effect for scroll on iOS 13

In the iOS 13 release notes it is stated that there is no longer the need to apply the following to an element to enable the bounce scroll effect: div{ overflow-x: scroll; -webkit-overflow-scrolling: touch; /* No longer needed */ } As I found out from this article. However, I can now no longer DISABLE this […]

By Ood
Published
Categorised as css, html, ios, scroll, webkit

Can’t use https://vintage.myetherwallet.com properly from WebKit

Why I can’t use https://vintage.myetherwallet.com properly from the WebKit. The problem is that when you open it in WebKit and go to the menu “Send Ether & Tokens” > Private key it’s not opening the textfield to type the private key, but when you open it from Safari it works. Why is that? Source: Ios

By Bogdan Bogdanov
Published
Categorised as ios, swift, webkit

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq