收紧 H5 剪贴板写入载荷

在 H5 HostBridge facade 发起剪贴板写入前按共享上限归一化文本

增加 HostBridge 写剪贴板载荷截断测试和总门禁反查

同步宿主壳协议文档和共享决策记录
This commit is contained in:
2026-06-19 15:19:42 +08:00
parent 048c879b20
commit b9ec549344
5 changed files with 56 additions and 3 deletions
+12
View File
@@ -1028,6 +1028,18 @@ function assertH5HostBridgePayloadBoundaries() {
'H5 HostBridge facade must use shared HOST_BRIDGE_SCANNER_TIMEOUT_MS',
);
}
if (
!h5HostBridgeSource.includes(
'const clipboardText = normalizeHostBridgeClipboardText(text);',
) ||
!h5HostBridgeSource.includes(
"return await requestNativeHostBoolean('clipboard.writeText', clipboardText);",
)
) {
throw new Error(
'H5 HostBridge facade must normalize clipboard.writeText payloads with the shared clipboard boundary',
);
}
}
function assertH5NativeAppTransportTimeoutBoundaries() {