I hereby claim:
- I am olanod on github.
- I am olanod (https://keybase.io/olanod) on keybase.
- I have a public key ASCWuwXgnKf8lH_Xw4ZKTBNlMjuEshtkbtg6OeBq_yv7Jgo
To claim this, I am signing this object:
const p = new DOMParser(); | |
const tagFn = fn => (strings, ...parts) => fn(parts | |
.reduce((tpl, value, i) => `${tpl}${strings[i]}${value}`, '') | |
.concat(strings[parts.length])) | |
const html = tagFn(s => new DOMParser() | |
.parseFromString(`<template>${s}</template>`, 'text/html') | |
.querySelector('template')) | |
const css = tagFn(s => { | |
let style = new CSSStyleSheet() | |
style.replaceSync(s) |
I hereby claim:
To claim this, I am signing this object:
default: build | |
OS=$(shell uname | tr [:upper:] [:lower:]) | |
PLATFORMS=linux darwin freebsd | |
PKG_NAME=$(shell glide name) | |
APP_NAME=$(shell basename $(PKG_NAME)) | |
APP_VERSION=$(shell git describe --tags --always) | |
BRANCH?=$(shell git rev-parse --abbrev-ref HEAD) | |
BUILD_DIR?=build |
const templates = Object.create(null, { | |
load: { | |
value: async function(fileName) { | |
const url = new URL(fileName, | |
document.currentScript && document.currentScript.src || location.href) | |
if (url in this) return this[url] | |
// fetch and parse template as string | |
let template = await fetch(url) | |
template = await template.text() | |
template = new DOMParser().parseFromString(template, 'text/html') |
// store for private variables | |
let _ = new WeakMap(); | |
/** | |
* Event emitter following browser's EventTarget interface | |
*/ | |
export class EventEmitter { | |
constructor() { | |
_.set(this, { callbacks: new Map() }); |
var navigation = createList(globalDataSet); | |
/** | |
* Create an HTML list from a tree-like data set | |
* @param {Array} data Recursive array | |
* @return {HTMLUListElement} Unordered list with the recursive set of children | |
*/ | |
function createList(data) { | |
var listElement = createListElement(); | |