New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome: Deprecation - Unload event listeners are deprecated and will be removed #2220
Comments
Hello, as a generic library we will not be removing the backward compatibility support for "hooking" the However, ApplicationInsights-JS/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IConfiguration.ts Lines 156 to 161 in 7f804d8
And once the event is no longer present (which we will still attempt to hook it), it just won't be hooked. I'm going to mark this issue as a documentation issue as we REALLY need to document this better. |
I'm injecting the AI JS into our ASP.NET Razor site using |
Our team doesn't directly maintain the NuGet package, however, the "configuration" that is defined in the snippet does support having this included , see https://github.com/Microsoft/ApplicationInsights-JS?tab=readme-ov-file#snippet-setup-ignore-if-using-npm-setup The Additionally, my understanding is that the NuGet package is effective just dropping the snippet onto the page, so it would also be possible to have your own version doing the same thing. We update updated or snippet generation to package this up so that you could injest the snippet via npm https://github.com/microsoft/ApplicationInsights-JS/tree/main/tools/applicationinsights-web-snippet, however, we have not yet added the ability to pass additional configuration via the "helper" functions that we have provided. But this just returns a string where we have the |
@MSNev I've tried to set this config value but no luck - still getting a warning in the Chrome Lighthouse report:
|
Description/Screenshot
Chrome indicates an issue when using @microsoft/applicationinsights-web version 3.0.6.
"Deprecated feature used"
"Unload event listeners are deprecated and will be removed."
Steps to Reproduce
22.0.6170.5 (Official Build) dev (64-bit) (cohort: Dev)
Windows 11 Version 22H2 (Build 22621.2428)
@microsoft/applicationinsights-web version 3.0.6
Expected behavior
No issue
The text was updated successfully, but these errors were encountered: