Use this to refer to the window of the application page. You can also reference window.document.
S(S.window).innerWidth(function(w){ ok(w > 1000, "window is more than 1000 px wide") })