MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / scroll_to

Function scroll_to

pywebio/output.py:340–353  ·  view source on GitHub ↗

Scroll the page to the specified scope :param str scope: Target scope. Default is the current scope. :param str position: Where to place the scope in the visible area of the page. Available value: * ``'top'`` : Keep the scope at the top of the visible area of the page *

(scope: str = None, position: str = Position.TOP)

Source from the content-addressed store, hash-verified

338
339
340def scroll_to(scope: str = None, position: str = Position.TOP):
341 """
342 Scroll the page to the specified scope
343
344 :param str scope: Target scope. Default is the current scope.
345 :param str position: Where to place the scope in the visible area of the page. Available value:
346
347 * ``'top'`` : Keep the scope at the top of the visible area of the page
348 * ``'middle'`` : Keep the scope at the middle of the visible area of the page
349 * ``'bottom'`` : Keep the scope at the bottom of the visible area of the page
350 """
351 if scope is None:
352 scope = get_scope()
353 send_msg('output_ctl', dict(scroll_to=scope2dom(scope), position=position))
354
355
356def _get_output_spec(type, scope, position, **other_spec):

Callers 2

basic_outputFunction · 0.85
mainFunction · 0.85

Calls 3

get_scopeFunction · 0.85
send_msgFunction · 0.85
scope2domFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…