10 questions
0
votes
1
answer
120
views
iOS WKWebView's addUserScript does not work first time for "about:blank"
I am able to demonstrate my issue using the below simple example.
I basically need to use the addUserScript to load different scripts based upon which website the web view has navigated to. This works ...
0
votes
1
answer
48
views
Why is my select element not changing options?
I am using Jquery and Jquery-UI 1.7.2. The code itself is a tampermonkey script with the grants necessary for GM_setValue and GM_getValue already written. The part of the code that has the issue is ...
2
votes
0
answers
162
views
How to evaluateJavaScript when app goes to background WKWebView?
I am create html page with HTML5 IMA SDK player and then load this page to WKWebView, all work fine pause, playing content etc, but I want "pause" content when app goes to background for ...
-1
votes
1
answer
532
views
WKUserScript init Crash on iOS 14: Use of unimplemented initializer init(source:injectionTime:forMainFrameOnly:in:)
Crash while executing this init method in ios 14
Use of unimplemented initializer init(source:injectionTime:forMainFrameOnly:in:)
class MyScript: WKUserScript {
init(source: String) {
super.init(...
2
votes
0
answers
86
views
javascript injection not being executed
I have included my function and the way im calling it
it does print "injecting" in console
but the javascript dosent seem to be injected
i have tested the js in safari console and chrome console it ...
1
vote
2
answers
1k
views
Removing a single specific user script from WKUserContentController
I'm using addUserScript() to add a user script to my WKWebView's WKUserContentController. I noticed that even if call loadRequest() the script stays around.
For certain use cases I may need to ...
2
votes
2
answers
1k
views
Refresh an external webpage every few seconds
For work, I spend a lot of time on domain-specific forums. Throughout the day, I check those forums to see if there are any questions and answers relevant to what I am working on. However, the ...
0
votes
1
answer
1k
views
WKUserScript forMainFrameOnly
WKUserScript has this init
init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool)
Simply what is meant by 'MainFrame' ?
0
votes
1
answer
801
views
WKUserScript not call in iOS10, but works in iOS9
I'm having code which perfectly works in iOS 9, but not working in iOS 10, specifically doBar() not called. Here in WKWebView I'm injecting javascript code.
let jsFoo = "function doFoo() { window....
7
votes
2
answers
10k
views
WKUserScript not working
I want to inject a script using WKWebview API. For some reason it isn't working and I can't figure it out. I've tried debugging in Safari developer console and I can't find the JavaScript code in ...