Refactor set resize

This is very ambiguous since the browser doesn't fire resize event callbacks for any element other than the window object.