diff --git a/skooma.js b/skooma.js index e3d8ef3..8fa4f92 100644 --- a/skooma.js +++ b/skooma.js @@ -87,3 +87,5 @@ export const handle = fn => event => { event.preventDefault(); return fn(event) export const html = nameSpacedProxy({nameFilter: name => name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}) export const svg = nameSpacedProxy({xmlns: "http://www.w3.org/2000/svg"}) + +export const text = (data="") => document.createTextNode(data) diff --git a/skooma.md b/skooma.md index ff0ca43..3ad4623 100644 --- a/skooma.md +++ b/skooma.md @@ -38,6 +38,13 @@ html.div({foo: "bar"}, {foo: false}) html.div(dataset: {foo: 1, bar: 2}) // Creates a