Web Viewer secure HTML+Javascript injection

Idea created by barryj on May 21, 2018
    Active
    Score4
    • Hemant Kumar Patel
    • barryj
    • bigtom
    • Markus Schneider

    Current'y the only way to insert locally created data into a web viewer is by using "data:text/html,"
    This is considered insecure and therefore certain activities are unavailable to us.
    e.g. "navigator.geolocation.getCurrentPosition()" is denied to us in Filemaker Go. Being able to show a user their position on a map is a useful feature.
    Can we have some way to inject Html  + Javascrip + data into the web viewer such that it's considered the same as it if had come from an online HTTPS source.

    A script step along the following lines would most likely solve all sorts of issues for me:

    Set Web Viewer[ Object Name: "WebViewer"; Action: Inject Content; Content: $myJavascript]

    Apple provide a mechanism for injecting javascript into a web page displayed in Webkit using WKUserContentController and WKUserScript.

    Can we leverage this?