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?
|
* @returns {boolean} Is a CSP with `unsafe-eval` set?
|
||||||
*/
|
*/
|
||||||
const isUnsafeEvalEnabled = function () {
|
const isUnsafeEvalEnabled: () => Promise<boolean> = function () {
|
||||||
return webFrame.executeJavaScript(`(${(() => {
|
// Call _executeJavaScript to bypass the world-safe deprecation warning
|
||||||
|
return (webFrame as any)._executeJavaScript(`(${(() => {
|
||||||
try {
|
try {
|
||||||
new Function(''); // eslint-disable-line no-new,no-new-func
|
new Function(''); // eslint-disable-line no-new,no-new-func
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue