3 ms·
Why does creating a new client side widget require a server call at all? Couldn't you have the widget in a JavaScript template and just clone it on the dom clie
by colecut 8y ago
Why does creating a new client side widget require a server call at all? Couldn't you have the widget in a JavaScript template and just clone it on the dom client side?
- nkingsy 8y agoCloning from a template would be the what, but I was wondering if there are tools designed for this. It's the kind of thing that could spike complexity and I would want an established pattern of delivering html solely for the purpose of javascript manipulation. It's not a hard problem, but a messy one.
- colecut 8y agoI would use a simple "javascript templating engine" like mustache or handlebars, to easily inject dynamic content into your widget templates.