1
votes

I have a page with iframe. Content inside iframe does window.parent.resizeTo calls (or something similar that in result resizes whole browser window). It does so to accommodate for its contents. I want to prevent resizing of whole browser window and just change the size of iframe element instead.

Is there a way to intercept these resize commands in Javascript? I tried listening to parent's "resize" events, but they seemed to happen post-factum, when the window is already resized.

1

1 Answers

2
votes

You could make the function do nothing:

var windowResizeTo = window.resizeTo; // In case we want to put it back later
window.resizeTo = function() {};