Skip to content

Commit be974de

Browse files
authored
fix logbox_clear
1 parent aeee3a9 commit be974de

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

pywebio_battery/__version__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
__package__ = 'pywebio_battery'
22
__description__ = 'Utilities that help write PyWebIO apps quickly and easily.'
33
__url__ = 'https://pywebio.readthedocs.io/en/latest/battery.html'
4-
__version__ = "0.6.0"
5-
__version_info__ = (0, 6, 0, 0)
4+
__version__ = "0.6.1"
5+
__version_info__ = (0, 6, 1, 0)
66
__author__ = 'WeiminWang'
77
__author_email__ = '[email protected]'
88
__license__ = 'MIT'

pywebio_battery/interaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def logbox_append(name: str, text: str):
242242

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

247247

248248
def put_video(src: Union[str, bytes], autoplay: bool = False, loop: bool = False,

pywebio_battery/web.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ def get_localstorage(key: str) -> str:
3939
"""Get the key's value in user's web browser local storage"""
4040
return eval_js("localStorage.getItem(key)", key=key)
4141

42+
4243
def clear_localstorage():
4344
"""Clear user's web browser local storage"""
4445
return eval_js("localStorage.clear()")
4546

47+
4648
def _init_cookie_client():
4749
session = get_current_session()
4850
if 'cookie_client_flag' not in session.internal_save:

0 commit comments

Comments
 (0)