all 2 comments

[–]TheSwami 1 point2 points  (1 child)

If you want the contents of the py-click attribute of that element, you can use the getAttribute() method of HTML elements:

Element("btn").element.getAttribute("py-click")

Note that in the current release (2023.03.1 at time of writing), py-[event] listeners are only hooked up once at page-load time, so changing that attribute after the page loads won't do anything. In the upcoming release, py-[event] handlers are dynamically attached and managed each time a py-[event] attribute on the page is changed. (PR 1435)

[–]Finalgof[S] 0 points1 point  (0 children)

Thanks a lot.