Created
October 18, 2019 20:04
-
-
Save jviide/b941ad94d01db216bb16c88b8dead667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# __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