IE Overwrite window.top

前端 未结 4 1506
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-15 05:17

I\'m trying to convince a page that it is the window.top even though it is in an iframe.

In FF you can do

window.defineGetter(\'top\', fu

4条回答
  •  轮回少年
    2021-01-15 06:06

    Use this:

    Object.defineProperty(window, "parent", { 
            get: function() {return window;} 
        }
    );
    

    More info here.

提交回复
热议问题