Deprecation note: Elements has evolved – check out the Colony processor for even simpler templates!
A template processor written in JavaScript. For a showcase see the contents of example. Learn more in the Wiki.
Import elements.min.js into your project. This can be done using a <script> tag in your documents <head>:
<script src="elements.min.js"></script>Note that rendering templates can be especially useful in a ServiceWorker. Import the script there using:
self.importScripts('elements.min.js');Now you are ready to make use of the renderer. Head over to the Wiki for a complete documentation.
- Licensed under the MIT License
- See also the PHP port
- Inspired by mustache