Skip to content

Commit

Permalink
fix: replace deprecated event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
Justkant committed May 27, 2024
1 parent 115a6bf commit 54f4ee0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export function useWebviewState(
webview.addEventListener("did-stop-loading", handleDidStopLoading);
webview.addEventListener("dom-ready", handleDomReady);
webview.addEventListener("did-fail-load", handleFailLoad);
webview.addEventListener("crashed", handleCrashed);
webview.addEventListener("render-process-gone", handleCrashed);

return () => {
webview.removeEventListener("page-title-updated", handlePageTitleUpdated);
Expand All @@ -242,7 +242,7 @@ export function useWebviewState(
webview.removeEventListener("did-stop-loading", handleDidStopLoading);
webview.removeEventListener("dom-ready", handleDomReady);
webview.removeEventListener("did-fail-load", handleFailLoad);
webview.removeEventListener("crashed", handleCrashed);
webview.removeEventListener("render-process-gone", handleCrashed);
};
}, [
handleDidNavigate,
Expand Down

0 comments on commit 54f4ee0

Please sign in to comment.