UNPKG

curl-amd

Version:

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.

18 lines (17 loc) 386 B
define(['text!./template.html', 'css!./css.css'], function (template, css) { return { render: function (node) { try { node.innerHTML = template; } catch (ex) { // firggin IE var div = node.ownerDocument.createElement('div'); div.innerHTML = template; while (div.firstChild) { node.appendChild(div.removeChild(div.firstChild)); } } } } });