小编kap*_*053的帖子

反应 iframe 沙箱不允许任何东西

我需要在 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”

html iframe sandbox reactjs

5
推荐指数
1
解决办法
1948
查看次数

标签 统计

html ×1

iframe ×1

reactjs ×1

sandbox ×1