Check if current page is frame with javascript

186 Views Asked by At

I want to check if my current page is in frame and i am doing this. But my browser crashing.I want to work with all browsers. How can i make it work without crashing? My code

if (window.frameElement) {
  //here is my code
}
0

There are 0 best solutions below