lukebayes/nomplate

Introduce ready helper for domcontentloaded handling

Closed this issue · 0 comments

There are a variety of hooks to choose from (DOMContentLoaded, onload, onready, etc.) when initializing a browser based application and this choice can impact page render times significantly.

Nomplate has one feature in that your application components can be rendered in their entirety prior to being attached to the DOM and then, once the DOM is ready, they can be attached all at once.

This then begs the question as to when to perform the attach operation. If we wait for onload, we may have waited too long if the server-side rendered page requests external assets or images.