This line should be last in this method. It's better practice to do all manipulation on the element prior to inserting it into the DOM. DOM manipulation is always the bottleneck for performance in heavy UIs. I realize this is trivial change and doesn't cause a repaint or reflow, but just making it apparent.