Skip to content

Instantly share code, notes, and snippets.

@jviide
Created October 18, 2019 20:04
Show Gist options
  • Save jviide/b941ad94d01db216bb16c88b8dead667 to your computer and use it in GitHub Desktop.
Save jviide/b941ad94d01db216bb16c88b8dead667 to your computer and use it in GitHub Desktop.
# __pragma__ ('skip')
from htm import htm
# __pragma__ ('noskip')
# __pragma__ ('ecom')
'''?
__pragma__('js', """
var module = {{}};
{}
var htmjs = module.exports;
""", __include__("node_modules/htm/dist/htm.js"))
def htm(h):
def _htm(string):
raise Exception("not supported")
def wrapped_h(type, props, *children):
return h(type, props, children)
def func(strings, values):
return htmjs.call(wrapped_h, strings, *values)
_htm.func = func
return _htm
?'''
# __pragma__ ('noecom')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment