const $ = require('dom-tagged-template');
const ul = $`<ul onClick=${e => {e.target.style.color=`hsl(${Math.floor(360*Math.random())},100%,50%)`}}>
${[1,2,3].map(x => $`<li>${x}</li>`)}
</ul>`.firstChild;
const div = $`<div>
<u onClick=${console.log}>Hello ${'!'.repeat(4)}</u>
${ul}
</div>`.firstChild;
const fragment = $`
<i>hello</i>
@
<br/>
<marquee>world</marquee>
`;
-
Notifications
You must be signed in to change notification settings - Fork 0
caub/dom-tagged-template
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Tagged template function for DOM building
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published