UNPKG

khufu-runtime

Version:

A runtime support library for khufu template engine

16 lines (15 loc) 435 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.add_style = add_style; function add_style(text) { var style = document.createElement('style'); var txnode = document.createTextNode(text); style.appendChild(txnode); document.head.appendChild(style); // Similar to subscribe/unsubscribe pattern return function remove() { document.head.removeChild(style); }; }