Module:H

--- -- https://github.com/hyperhype/hyperscript --

local _ = require('Module:Core')

local function h(tag, ...) return { tag = tag, children = {...} } end

local function render(element)

end

local function test local ui = h('div#page',           h('#header', h('h1.classy', 'h', { style = { ['background-color'] = '#22f'} }), h('h1.fun', { style = { ['font-family'] = 'Comic Sans MS' } }, 'Happy Birthday!'), h('h1.fun', { style = 'font-family: Comic Sans MS'}, 'Happy Birthday!')),           h('.nav.left#menu', { style = { ['background-color'] = '#2f2'} }, h('ul',                   h('li', 'one'),                    h('li', 'two'),                    h('li', 'three'),                    h('li', h('a', { href = 'https://npm.im/hyperscript' }, 'hyperscript')),                    {                        h('li', '...'),                        h('li', '...'),                    })),            h('h2', 'content title',  { style = { ['background-color'] = '#f22'} }),            h('p', "so it's just like a templating engine,\n", "but easy to use inline with javascript\n"),           h('p', "the intention is for this to be used to create\n", "reusable, interactive html widgets. ")) mw.log(_.js(ui)) end

return { h = h, render = render, test = test, }

-- print(p.test)