fix: suppress worldSafe warning emitted from security checks (#25692)
This commit is contained in:
parent
e2132acc5c
commit
822b044068
1 changed files with 3 additions and 2 deletions
|
@ -76,8 +76,9 @@ const isLocalhost = function () {
|
|||
*
|
||||
* @returns {boolean} Is a CSP with `unsafe-eval` set?
|
||||
*/
|
||||
const isUnsafeEvalEnabled = function () {
|
||||
return webFrame.executeJavaScript(`(${(() => {
|
||||
const isUnsafeEvalEnabled: () => Promise<boolean> = function () {
|
||||
// Call _executeJavaScript to bypass the world-safe deprecation warning
|
||||
return (webFrame as any)._executeJavaScript(`(${(() => {
|
||||
try {
|
||||
new Function(''); // eslint-disable-line no-new,no-new-func
|
||||
} catch {
|
||||
|
|
Loading…
Add table
Reference in a new issue