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
function createNode(html) { | |
const nodeList = Document.parseHTMLUnsafe(html).body.childNodes; | |
const fragment = new DocumentFragment(); | |
Array.from(nodeList).forEach(node => { | |
fragment.appendChild(node); | |
}); | |
return fragment; | |
} | |
document.body.append(createNode('<h2>hello</h2><p>world</p>')); |
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
module.exports = { | |
mode: "jit", | |
purge: ["./app/**/*.{ts,tsx}"], | |
darkMode: "media", // or 'media' or 'class' | |
theme: { | |
fontFamily: { | |
sans: ['ui-sans-serif', 'system-ui'] | |
}, | |
colors: { | |
transparent: 'transparent', |
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
> 10% in GB | |
not ie 11 | |
not ie_mob 11 | |
last 3 Chrome versions | |
last 3 firefox versions | |
last 1 Edge versions | |
last 2 Opera versions |
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
const basicHTML = require('basichtml'); | |
basicHTML.init(); | |
document.documentElement.setAttribute('lang', 'en'); | |
const {bind} = require('hyperhtml'); | |
addEventListener('fetch', event => { | |
event.respondWith(responder(event.request)) | |
}); |