Files: b3e2feb620b8617e72d7d07a600aea220c8b0992 / app / html.js
600 bytesRaw
1 | if (typeof window === 'undefined') { |
2 | window = require('global/window') |
3 | document = require('global/document') |
4 | } |
5 | |
6 | const nest = require('depnest') |
7 | const create = require('hyps/createElement') |
8 | const update = require('morphdom') |
9 | const H = require('@skatejs/val') |
10 | const Hx = require('hyperx') |
11 | |
12 | module.exports = { |
13 | gives: nest('html', [ |
14 | 'create', |
15 | 'update', |
16 | 'h', |
17 | 'hx', |
18 | ]), |
19 | needs: nest('html', { |
20 | 'create': 'first', |
21 | 'h': 'first' |
22 | }), |
23 | create: (api) => { |
24 | return nest('html', { |
25 | create, |
26 | update, |
27 | h: H(api.html.create), |
28 | hx: Hx(api.html.h) |
29 | }) |
30 | } |
31 | } |
32 |
Built with git-ssb-web