Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

WKWebView - Some Javascript Not Working
Started by a3mg Mar 26 2020 12:30 PM

1 reply to this topic
wkwebview javascript
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

a3mg

[GLOBAL: userInfoPane.html]
a3mg
  • Enthusiast

  • 53 posts
  • Corona SDK

I have an issue with WKWebView using Daily Build 3577 where some javascript functions in the html files that used to work (in daily builds with UIWebView) no longer work on the iPad or Xcode Simulator.  
 
Here is a simple Corona project for iPad that includes the html files with the javascript functions - https://www.dropbox.com/s/agkpgl90ca8sbo8/WKWebView_Test.zip?dl=0
 
The html setup includes an index.html page that has a Tumult Hype project in a container on the page. In the Hype file is an embedded html page with buttons with javascript functions that need to be able to do things in the parent Hype file, either directly or via the index.html page.
 
The javascripts for the buttons in the html files work fine in the Corona Simulator and in Safari on the desktop, just not on the iPad device or Xcode Simulator using any daily builds after the switchover to WKWebView.
 
Any help is appreciated. Thanks, Davey


[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,246 posts
  • Corona SDK

I'd wager a guess that whatever browser is running said WKWebView doesn't have (any may not have) sufficient permissions and/or functionalities to run all JS functions. It could also be that the browser is quite old and you are trying to run some new functions that the browser simply doesn't understand.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: wkwebview, javascript