我需要在 React 应用程序中使用 iframe 沙箱。其中,我不想允许任何事情并限制一切。
因此,当我将沙箱作为空白传递时,例如:-
<iframe
frameBorder="0"
ref={(container) => { this.container[index] = container; }}
srcDoc={thread.body}
sandbox
/>
Run Code Online (Sandbox Code Playgroud)
我得到这个 - “警告:收到true非布尔属性sandbox。”
反应:“^16.5.2”