You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, fly.js can't support synchronizing Cookies between native and DWKWebView, but it supports forwarding the http request to Native through any Javascript bridge, and fly.js has already provide the dsBridge adapter. Suppose that all HTTP requests will be sent out on native side, there's no longer need to sync Cookies to DWKWebView. all you need to do is implementing a API named onAjaxRequest in default API namespace :
/** * Note: This method is for Fly.js * In browser, Ajax requests are sent by browser, but Fly can * redirect requests to native, more about Fly see https://github.com/wendux/fly * @param requestInfo passed by fly.js, more detail reference https://wendux.github.io/dist/#/doc/flyio-en/native*/
-(void)onAjaxRequest:(NSDictionary *) requestInfo :(void (^)(NSString * _Nullable result,BOOL complete))completionHandle{
}
wendux
changed the title
How to synchronize Cookies between native and DWKWebView ?
How to synchronize cookie between native and DWKWebView ?
Feb 8, 2018
There are two ways to do this:
With JavaScript
With fly.js
Actually, fly.js can't support synchronizing Cookies between native and DWKWebView, but it supports forwarding the http request to Native through any Javascript bridge, and fly.js has already provide the dsBridge adapter. Suppose that all HTTP requests will be sent out on native side, there's no longer need to sync Cookies to DWKWebView. all you need to do is implementing a API named
onAjaxRequest
in default API namespace :More details please refer to:
The text was updated successfully, but these errors were encountered: