
However, the Window interface is a suitable place to include these items that need to be globally available. The Window interface is home to a variety of functions, namespaces, objects, and constructors which are not necessarily directly associated with the concept of a user interface window. The Window interface represents a window containing a DOM document the document property points to the DOM document loaded in that window.Ī window for a given document can be obtained using the faultView property.Ī global variable, window, representing the window in which the script is running, is exposed to JavaScript code. vrdisplaypresentchange Non-standard Deprecated.vrdisplaydisconnect Non-standard Deprecated.vrdisplaydeactivate Non-standard Deprecated.vrdisplayconnect Non-standard Deprecated.vrdisplayactivate Non-standard Deprecated.webkitConvertPointFromPageToNode() Non-standard Deprecated.showModalDialog() Non-standard Deprecated.requestFileSystem() Non-standard Deprecated.convertPointFromNodeToPage() Non-standard.credentialless Experimental Non-standard.applicationCache Non-standard Deprecated.leading edge, instead of the trailing. If `immediate` is passed, trigger the function on the

The function will be called after it stops being called for Returns a function, that, as long as it continues to be invoked, will not Here's the basic JavaScript debounce function ( as taken from Underscore.js): Why not limit the rate at which the function can fire? That isn't a heavy task in itself but being repeatedly fired after numerous resizes will really slow your site down. A quick example: you have a resize listener on the window which does some element dimension calculations and (possibly) repositions a few elements. If your web app uses JavaScript to accomplish taxing tasks, a debounce function is essential to ensuring a given task doesn't fire so often that it bricks browser performance.įor those of you who don't know what a debounce function does, it limits the rate at which a function can fire. One of the biggest mistakes I see when looking to optimize existing code is the absence of the debounce function.
