fix: redirect webview navigation methods (#42981)

This commit is contained in:
Alice Zhao 2024-07-29 04:00:51 -07:00 committed by GitHub
parent 55e7a47d70
commit 4286234721
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 10 deletions

View file

@ -1,3 +1,14 @@
export const navigationHistorySyncMethods = new Set([
'canGoBack',
'canGoForward',
'canGoToOffset',
'clearHistory',
'goBack',
'goForward',
'goToIndex',
'goToOffset'
]);
// Public-facing API methods.
export const syncMethods = new Set([
'getURL',
@ -8,14 +19,6 @@ export const syncMethods = new Set([
'stop',
'reload',
'reloadIgnoringCache',
'canGoBack',
'canGoForward',
'canGoToOffset',
'clearHistory',
'goBack',
'goForward',
'goToIndex',
'goToOffset',
'isCrashed',
'setUserAgent',
'getUserAgent',
@ -51,7 +54,8 @@ export const syncMethods = new Set([
'getZoomFactor',
'getZoomLevel',
'setZoomFactor',
'setZoomLevel'
'setZoomLevel',
...navigationHistorySyncMethods
]);
export const properties = new Set([