Phoxy: requiring scripts on the fly
I know it going to be little confusing for one you you who do not know phoxy. Cascades is a regular way to plan execution queue order.
Here i am rendering markdown as soon as div and required library connected to DOM.
Same way with modals, dimmers, popups and everything. I am could build, substitute, listen, callback, reorganize on the fly. Call it monkey-patching on html if you want. Great flexibility freeing my hands.