Skip to content

Commit

Permalink
fix(web-view): Bump version + support shared cookies
Browse files Browse the repository at this point in the history
- Bump to 13.13.2
- Pass through shared cookies enabled prop
  • Loading branch information
olegpesok committed Feb 26, 2025
1 parent 67183b6 commit 6ad23f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"react-native": "^0.76.6",
"react-native-gesture-handler": "^2.11.0",
"react-native-safe-area-context": "^4.2.4",
"react-native-webview": "^13.2.2"
"react-native-webview": "^13.13.2"
},
"devDependencies": {
"@babel/cli": "7.26.4",
Expand Down Expand Up @@ -105,7 +105,7 @@
"react-dom": "18.3.1",
"react-native": "0.76.6",
"react-native-gesture-handler": "2.11.0",
"react-native-webview": "13.2.2",
"react-native-webview": "13.13.2",
"react-test-renderer": "18.3.1",
"ts-node": "10.9.2",
"typescript": "5.7.3"
Expand Down
4 changes: 4 additions & 0 deletions src/components/hv-web-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export default class HvWebView extends PureComponent<HvComponentProps> {
injectedJavaScript +=
'window.ReactNativeWebView.postMessage("hv-web-view:render-loading:false");';
}
const sharedCookiesEnabled = props['shared-cookies-enabled']
? props['shared-cookies-enabled'] === 'true'
: undefined;
const source = { html: props.html, uri: props.url } as const;
return (
<WebView
Expand All @@ -71,6 +74,7 @@ export default class HvWebView extends PureComponent<HvComponentProps> {
<></>
);
}}
sharedCookiesEnabled={sharedCookiesEnabled}
source={source}
startInLoadingState
/>
Expand Down

0 comments on commit 6ad23f3

Please sign in to comment.