You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is by design, the SDK supports and handles many runtimes.
Just because the SDK happens to attempt to use and hook the unload event (along with the beforeunload, pagehide, visibilitychange) is not a bug. Once the unload event is no longer support (as it is with other runtimes that we run in today) the SDK will continue to work.
If you want to stop this warning, we have a several configurations that you can use disablePageUnloadEvents - this is an array of "names" (it defaults to empty) where you can tell us to "please" do not attempt to hook these events. For this specific case you can add the following to the configuration passed during initialization
disablePageUnloadEvents: ["unload"],
And now we will no longer attempt to use the "unload" event -- UNLESS, all of the other events are also not available.
For example, if you tell use to not use "unload" and "beforeunload" and we happen to get loaded into a runtime that does not support the "visibilitychange" or "pagehide" then we WILL ignore this config and attempt to hook the default set including "unload" and "beforeunload".
Activity
MSNev commentedon Apr 29, 2025
This is by design, the SDK supports and handles many runtimes.
Just because the SDK happens to attempt to use and hook the
unloadevent (along with thebeforeunload,pagehide,visibilitychange) is not a bug. Once theunloadevent is no longer support (as it is with other runtimes that we run in today) the SDK will continue to work.If you want to stop this warning, we have a several configurations that you can use
disablePageUnloadEvents- this is an array of "names" (it defaults to empty) where you can tell us to "please" do not attempt to hook these events. For this specific case you can add the following to the configuration passed during initializationAnd now we will no longer attempt to use the "unload" event -- UNLESS, all of the other events are also not available.
For example, if you tell use to not use "unload" and "beforeunload" and we happen to get loaded into a runtime that does not support the "visibilitychange" or "pagehide" then we WILL ignore this config and attempt to hook the default set including "unload" and "beforeunload".