Skip to content

Commit

Permalink
Added logbox_clear function
Browse files Browse the repository at this point in the history
  • Loading branch information
amks1 committed Apr 19, 2024
1 parent e9a97f3 commit b4eb4b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pywebio_battery/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ def logbox_append(name: str, text: str):
run_js('$("#webio-logbox-%s").append(document.createTextNode(text))' % name, text=str(text))


def logbox_clear(name: str):
"""Clear all contents of a logbox widget"""
pywebio.session.run_js('$("#webio-logbox-%s").empty()' % name)


def put_video(src: Union[str, bytes], autoplay: bool = False, loop: bool = False,
height: int = None, width: int = None, muted: bool = False, poster: str = None,
scope: str = None, position: int = OutputPosition.BOTTOM) -> Output:
Expand Down

0 comments on commit b4eb4b1

Please sign in to comment.