scope. All variables declared in a function, no matter where they are declared, are defined throughout the function.” D. Flanagan “JavaScript: The Definitive Guide” Wednesday, 2 May 2012
= function (messages) { return function () { var field = document.getElementById("input"); messages.push(field.value); }; }; elem.onclick = onclick(messages); Wednesday, 2 May 2012
re-calculating the positions and geometries of elements in the document, for the purpose of re-rendering part or all of the document.” https://developers.google.com/speed/articles/reflow Wednesday, 2 May 2012
with display: none (reflow and repaint) or visibility: hidden (repaint only, because no geometry changes) •Moving, animating a DOM node on the page •Adding a stylesheet, tweaking style properties •User action such as resizing the window, changing the font size or scrolling Wednesday, 2 May 2012