Ignored call to 'alert()'. The document is sandboxed, and the 'allow-modals' keyword is not set

后端 未结 2 1933
感动是毒
感动是毒 2020-12-10 13:05

Whenever running alert(\'something\') in JSFiddle, I get the error:

Ignored call to \'alert()\'. The document is sandboxed, and the \'all

2条回答
  •  北海茫月
    2020-12-10 13:35

    That is something JSFiddle must have changed to its iframes to add the sandbox attribute. Or Chrome must have added support allow-modals.

    Actually it is something new for Chrome 46+:

    • https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/sandbox/blink-dev/mXX0AO6Lioo/ual1B_3IqTYJ
    • https://www.chromestatus.com/feature/4747009953103872

提交回复
热议问题