This commit is contained in:
Lorenzo Pichilli 2023-11-14 23:13:02 +01:00
parent acb20fc10a
commit b190d02925
2 changed files with 14 additions and 10 deletions

View File

@ -5,6 +5,7 @@
- Added support for Android `WebViewFeature.isStartupFeatureSupported`, `WebViewFeature.STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS`, `WebViewFeature.STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX`, `WebViewFeature.WEB_MESSAGE_ARRAY_BUFFER`
- Added `WebMessage.type` property
- Fixed "iOS EXC_BAD_ACCESS crash on kill app with InAppWebView keyboard open" [#1837](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1837)
- Fixed "Flutter Web - TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'. error" [#1841](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1841)
### BREAKING CHANGES

View File

@ -139,8 +139,10 @@ window.flutter_inappwebview = {
}
var initialTitle = iframe.contentDocument.title;
var titleEl = iframe.contentDocument.querySelector('title');
webView.documentTitle = initialTitle;
window.flutter_inappwebview.nativeCommunication('onTitleChanged', viewId, [initialTitle]);
if (titleEl != null) {
new MutationObserver(function(mutations) {
var title = mutations[0].target.innerText;
if (title != webView.documentTitle) {
@ -148,9 +150,10 @@ window.flutter_inappwebview = {
window.flutter_inappwebview.nativeCommunication('onTitleChanged', viewId, [title]);
}
}).observe(
iframe.contentDocument.querySelector('title'),
titleEl,
{ subtree: true, characterData: true, childList: true }
);
}
var oldPixelRatio = iframe.contentWindow.devicePixelRatio;
iframe.contentWindow.addEventListener('resize', function (e) {