MDN notes that the standard form includes no parameter but that including a nonstandard boolean parameter can make a difference for Firefox users.
MDN gives no indication that this function is deprecated or what if anything it has been replaced with.
Why does SonarQube (Version 8.9.5 (build 50698)) flag it as deprecated?
Sorry for the long delay.
Could you share the code sample? There is probably a problem with type resolution.
It’s pretty short, just
So finally I found the root cause. The version of embedded TS in SQ 8.9 provides (probably mistakenly as it was removed later) types that this method is deprecated TypeScript/lib.dom.d.ts at v4.2.4 · microsoft/TypeScript · GitHub.
In latest releases version of TS is updated and this issue is not reported anymore. So unfortunately the only fix I can suggest is to update to latest SQ or just won’t fix the issue in UI.