Upstream source code synchronization
This commit is contained in:
@@ -1442,8 +1442,12 @@ class _OfficialDownloadDesktopWebViewState
|
||||
domStorageEnabled: true,
|
||||
supportZoom: false,
|
||||
transparentBackground: true,
|
||||
isInspectable: true,
|
||||
cacheMode: desktop.CacheMode.LOAD_DEFAULT,
|
||||
supportMultipleWindows: false,
|
||||
useShouldOverrideUrlLoading: true,
|
||||
useOnDownloadStart: true,
|
||||
useHybridComposition: true,
|
||||
),
|
||||
onWebViewCreated: (controller) {
|
||||
_controller = controller;
|
||||
@@ -1457,6 +1461,18 @@ class _OfficialDownloadDesktopWebViewState
|
||||
);
|
||||
},
|
||||
onLoadStop: (_, url) => _installHook(),
|
||||
shouldInterceptRequest: (_, request) async {
|
||||
final url = request.url.toString();
|
||||
if (widget.onNavigationUrl(url)) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
onLoadStart: (_, url) {
|
||||
if (url != null) {
|
||||
widget.onNavigationUrl(url.toString());
|
||||
}
|
||||
},
|
||||
shouldOverrideUrlLoading: (_, action) {
|
||||
final url = action.request.url?.toString();
|
||||
if (url != null && widget.onNavigationUrl(url)) {
|
||||
|
||||
Reference in New Issue
Block a user