Skip to content
Merged
Prev Previous commit
comment and changelog
  • Loading branch information
bparrishMines committed Feb 13, 2025
commit d989135b31f1f947c8353a2fc6d3c510c6a2764b
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 3.18.1

* Updates internal API wrapper to make all Flutter methods with a non-null return value be required
to implement.
* Fixes bug that would allow the API wrapper to return `null` when a non-null value was required in
a callback method.
* Changes default method to enable JavaScript for web content to
`WKWebpagePreferences.allowsContentJavaScript`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class PreferencesProxyAPIDelegate: PigeonApiDelegateWKPreferences {
pigeonApi: PigeonApiWKPreferences, pigeonInstance: WKPreferences, enabled: Bool
) throws {
if #available(iOS 14.0, macOS 11.0, *) {
// On iOS 14 and macOS 11, WKWebpagePreferences.allowsContentJavaScript should be
// used instead.
throw (pigeonApi.pigeonRegistrar as! ProxyAPIRegistrar)
.createUnsupportedVersionError(
method: "WKPreferences.javaScriptEnabled",
Expand Down