- htag
loading pyscript ;-)
from htag import Tag
class AComponent(Tag.div):
def init(self,txt):
self <= txt
class Main(Tag.body):
statics = Tag.title("My Title")
def init(self):
self <= AComponent("htag demo in pyscript")
self <= Tag.button("add content",_onclick= self.test )
self <= Tag.button("js alert box",_onclick="alert(42)")
def test(self,object):
self <= Tag.li("hello from pyscript")
###############################################################################
from htag.runners.pyscript import PyScript
from js import window
PyScript( Main ).run( window )