fix(webview): ignore load notifications from browser error documents

This commit is contained in:
Levi committed 2026-09-18 00:07:55 +08:00
1 parent 1776b05782
commit 2fd8a96c5d
4 files changed
+57 -5

No files matched your search

@@ -4,6 +4,8 @@ import 'dart:convert';
String buildWebViewEventScript(String channel) => '''
(() => {
if (window !== window.top) return;
// Browser error documents are reported by native load-error callbacks.
if (location.protocol === 'chrome-error:') return;
const pending = [];
const flush = () => {
const bridge = window.flutter_inappwebview;