Vanilla patterns

Using existing nodes

For any node that isn't dynamically created at runtime, we pre-render it in HTML and select it in our JavaScript code, usually by using its id attribute. This saves us the trouble of having to explicitly create it.