polite-element
Politely waits to render an element until the browser has time to spare using window.requestIdleCallback(). Useful to create incrementally loading applications that don't block user interaction.
Usage
var polite = var html = var main = html` `documentbody { return html` `} { return html` `}
API
el = politeElement(renderBasic, renderFancy)
Create an initial element on load using renderBasic
. Once the browser is less
busy it will call the renderFancy
function to load a more complex
element. Always calls renderBasic
when run in Node.
Installation
$ npm install polite-element