v0.80.0 : @expose is coming (but broken currently)
2 new features :
- the
Tag.STRICT_MODE
, when True : will raise anHtagException
when dynamics tags (which use owndef render(self):
) change its first childs (it's a parano behaviour, to avoid creating tags which renders themselves at each interactions) (TODO: need doc) @htag.expose
(BROCKEN : will be fixed soon): will auto declare js-callback on python method (whose are decorated) (TODO: need doc)
Great simplification to do things like that (call from js side)
from htag import Tag, expose
class App(Tag.body):
def init(self):
self <= Tag.button("hello",_onclick="self.action(42)" )
@expose
def action(self,val):
assert val == 42
BTW : this example ^^ is dumb, it has no interest IRL (prefer to call python directly with a self.bind
, for example)
Full Changelog: v0.72.0...v0.80.0