:earth_asia: A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.
1.96k
stars
305
forks
source link
webview crash: Completion handler passed to -[DWKWebView webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called #105
how to appear this crash:
sometime,H5 need to write code like: setTimeout("alert('yo man!')",1000)
when users navigate into a dwkwebview controller, the H5 delay a alert work,
users pop out the dwkwebview controller, the webview will not dealloc immediately and the alert appeared. after a few seconds the webview will be dealloc, and the dwkwebview crash.
we must call alert completion handler before webview dealloc.
how to appear this crash: sometime,H5 need to write code like: setTimeout("alert('yo man!')",1000) when users navigate into a dwkwebview controller, the H5 delay a alert work, users pop out the dwkwebview controller, the webview will not dealloc immediately and the alert appeared. after a few seconds the webview will be dealloc, and the dwkwebview crash.
we must call alert completion handler before webview dealloc.