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 use AJAX instead of iframe? #360

Open marialovesbeans opened 5 years ago

marialovesbeans commented 5 years ago

Hi, two questions:

  1. Instead of creating iframe, why not simply use ajax to send data from JS to native?
  2. Why not using window.location?
chaoliu commented 5 years ago

In my opinion 1

2 window.location : maybe work ,but iframe should be more appropriate