This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var insertCSS = require('insert-css') | |
| var domify = require('domify') | |
| var css = ".button { display: inline-block; font-family: Arial; background-color: papayawhip; padding: 10px; border: 1px solid salmon; }" | |
| var html = '<div class="button">BUTTON</div>' | |
| // inserts new <style> tag into the <head> | |
| insertCSS(css) | |
| // append the html elements that domify returns to the <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var likely = require("likely.js"); | |
| var data = {list:[1, 2, 3]}; | |
| var template = likely.Template([ | |
| 'for key, value in list', | |
| ' p', | |
| ' {{ value }}' | |
| ]); | |
| var div = document.createElement("div"); |