omi/packages/omi-html/index.js

24 lines
472 B
JavaScript
Raw Normal View History

2018-11-21 14:11:49 +08:00
var Omi = typeof require === 'function'
? require('omi')
: window.Omi
2018-11-21 12:45:51 +08:00
2018-11-21 14:26:06 +08:00
if (!Omi) {
2018-11-21 14:11:49 +08:00
Omi = window.Omi
2018-11-21 13:04:52 +08:00
}
2018-11-21 13:53:13 +08:00
2018-11-21 14:11:49 +08:00
var htm = typeof require === 'function'
? require('htm')
: window.htm
2018-11-21 13:53:13 +08:00
2018-11-21 14:11:49 +08:00
var html = htm.default ? htm.default.bind(Omi.h) : html.bind(Omi.h)
if (typeof exports == "object") {
module.exports = html
} else if (typeof define == "function" && define.amd) {
define([], function () { return html })
2018-11-21 14:26:06 +08:00
}
if (typeof window !== 'undefined') {
2018-11-21 14:11:49 +08:00
window.html = html
}