Releases: manatlan/htag
v0.100.0 "ev"
Here come the "ev" system for (real) events mechanism.
I didn't planned to introduce such a big change like this, but it will be a lot better !
Til now ... the "object" (caller_object) which is passed to the callback method is the current object which has emitted the event.
def add_content( caller_object ): # caller_object is the Tag.button
self += "hello"
self += Tag.button("add", _onclick=add_content)
Now, there is a quirk, to pass a "real event" (like a javascript dom event) : if you name it "ev", htag will pass an "event" ! So you will need to adapt your code to :
def add_content( ev ): # ev is a event (namedTuple)
self += "hello"
self += Tag.button("add", _onclick=add_content)
And now, ev is not a "caller object" anymore, but an "event" ... and so, the "caller object" is in ev.target
(like in js side), others properties are properties of ev (ex: ev.clientX
)
It's a quirk (because it's only based on the name of the argument), but I have a lot of components to adapt ... and don't want to introduce big api changes too. But need to find a better way for the future 1.0 ;-)
IMPORTANT : this version works only on simple callback (with a unique parameter "ev"). If you try to bind "ev" and other parameters : it can't work ! Need to fix soon
v0.91.1
v0.91.0
v0.90.4
v0.90.3
v0.90.2
v0.90.1
v0.90.0 - all runners are deprecated
All current runners (desktop) replaced by faked ones (using the new runner)
All others good old runners are now faked ones (but compatibles) : BrowserHTTP, BrowserStarletteHTTP, BrowserStarletteWS, DevApp, ChromeApp, WinApp, AndroidApp, BrowserTornadoHTTP ... and they are just using the new runner (in pure python, no more dependancies likes uvicorn, starlette, tornado, kivy etc ...). All these would completly disappear when 1.0.0 will be released.
It's a transition phase, before 1.0.0 ....
There will be only 3 runners : "pyscript", "pywebview" and the new one (which will work for android, desktop and/or chrome app mode)) (pywebview could be in another package (to avoid dependancy to webview package)
TODO: docs+finition on the new runner ... (that's why I didn't mention the new name)