📜  如何防止 react js 中的点击劫持 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:56.148000             🧑  作者: Mango

代码示例1
// Won't render the application if WebApp is under Clickjacking attack
if(window.self === window.top) {
  ReactDOM.render(, document.getElementsByClassName('app')[0]);
} else{
  ReactDOM.render(, document.getElementsByClassName('app')[0]);
}