marcuswestin / WebViewJavascriptBridge

An iOS/OSX bridge for sending messages between Obj-C and JavaScript in UIWebViews/WebViews
http://marcuswest.in
MIT License
14.29k stars 2.98k forks source link

Why not automatically inject JSFile? #393

Open joe223 opened 4 years ago

joe223 commented 4 years ago

WebViewJavascriptBridge is a great library. But when I using, I was curious that why not automatically inject JSFile, but match a specific Request URL? If View instance A need a webview with JSBridge, automatically injection should be more convenient. https://github.com/marcuswestin/WebViewJavascriptBridge/blob/f40e3d3a280ddf1cefb202a61c7960f8c49a1af8/WebViewJavascriptBridge/WebViewJavascriptBridge.m#L182-L186

housenkui commented 4 years ago

I had refactor the WebViewJavascriptBridge . If you are in trouble.You can try this. Download Address: https://github.com/housenkui/WebViewJavascriptBridge More light and more simple to use. 10 mins will enough to completed your demand.