turbolinks / turbolinks-ios

Native iOS adapter for building hybrid apps with Turbolinks 5
MIT License
881 stars 92 forks source link

Make WebView.callJavaScriptFunction() Public #131

Closed joemasilotti closed 6 years ago

joemasilotti commented 6 years ago

I've started to reuse the helper function WebView.callJavaScriptFunction() in a few of my Turbolinks projects. The encoding and extra level of error handling have proved extremely useful. I've usually just copied and pasted it.

Instead, would a PR be accepted if this function was made public? Or extracted out to its own helper that works with WKWebView directly? Or should this function (and its callees) not be used outside of the framework?

joemasilotti commented 6 years ago

One month check-in! Any thoughts on this?

zachwaugh commented 6 years ago

I think we should keep this private, in case we need to change how that works internally, we don't want to worry about breaking any clients.

digerata commented 4 years ago

@joemasilotti I'm wondering the best way to expose this function. Just getting familiar with the framework. It seems like we need to subclass WebView and somehow pass that to Session? Do you have a public branch you could share?

joemasilotti commented 4 years ago

For my project I copy and pasted the code to a helper that lives on WKWebView.