Comments (8)
嗯,这个没有太好的方案。建议使用JSBridge提供给H5选择照片的能力
from kkjsbridge.
嗯,这个没有太好的方案。建议使用JSBridge提供给H5选择照片的能力
这个已经支持了,但是交互需要展示图片上传远端的进度,这个目前没有好的方案解决,因为上传请求会被 hook
from kkjsbridge.
是的
from kkjsbridge.
你可以考虑在选择照片组件里显示上传进度
from kkjsbridge.
你可以考虑在选择照片组件里显示上传进度
目前交互需求是在 H5 页面上展示上传进度,因为选择完照片后不一定要立即上传。
原生能否增加类似白名单配置、或者让 H5 设置某个请求不进行 hook,目前这个配置都是全局的。
类似下面代码,针对某个 request 或 path 来设置白名单
+ (BOOL)canInitWithRequest:(NSURLRequest *)request {
// 看看是否已经处理过了,防止无限循环
if ([NSURLProtocol propertyForKey:kKKJSBridgeNSURLProtocolKey inRequest:request]) {
return NO;
}
}
from kkjsbridge.
这里是设不了白名单的。可以通过后台下发白名单列表,然后在 WebViewVC 入口的地方来控制是否需要 ajax hook
from kkjsbridge.
这里是设不了白名单的。可以通过后台下发白名单列表,然后在 WebViewVC 入口的地方来控制是否需要 ajax hook
目前改为只在使用离线缓存、或需要本地资源拦截的页面,开启 hook 了,其他页面关闭 ajax hook 以及 URLProtocol 的注册,感谢~
from kkjsbridge.
不客气
from kkjsbridge.
Related Issues (20)
- 页面中iframe内页调用native方法之后,回调函数不执行
- window.prompt("KKJSBridge", messageString)不触发UIDelegate回调方法 HOT 4
- url参数包含中文,利用 requestId 生成新的 url就会有问题 HOT 5
- 如何实现重定向页面的跳转 HOT 4
- 用了这个解决了ajax请求body丢失的问题后又出现xhr.upload.addeventlistener 失效的问题 HOT 1
- cookie问题请教 HOT 2
- H5离线包如果使用虚拟域名加载可以支持吗? HOT 1
- 使用测试Demo加载百度,打开百度新闻视频类加载不了
- 302 重定向后 cookie 出错
- Demoy源码
- crash:NSOperationQueue 0x282bedca0 (QOS: UNSPECIFIED) HOT 1
- ajax同步请求这里为啥直接弹alert了大佬
- 如果是使用Ajax Hook 部分 API + NSURLProtocol会不会app store审核能过吗? HOT 1
- 复用时,H5 跳转页面,点导航返回异常 HOT 1
- iframe 的请求,body 是空的
- websocket拦截不了
- -[__NSArrayM bytes]: unrecognized selector sent to instance
- Google CapTcha HOT 1
- Hook后无法正常打开网页 HOT 1
- 使用KKWebView后js交互方法执行异常
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kkjsbridge.