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

Function put_scope

pywebio/output.py:1459–1474  ·  view source on GitHub ↗

Output a scope :param str name: :param list/put_xxx() content: The initial content of the scope, can be ``put_xxx()`` or a list of it. :param int scope, position: Those arguments have the same meaning as for `put_text()`

(name: str, content: Union[Output, List[Output]] = [], scope: str = None,
              position: int = OutputPosition.BOTTOM)

Source from the content-addressed store, hash-verified

1457
1458@safely_destruct_output_when_exp('content')
1459def put_scope(name: str, content: Union[Output, List[Output]] = [], scope: str = None,
1460 position: int = OutputPosition.BOTTOM) -> Output:
1461 """Output a scope
1462
1463 :param str name:
1464 :param list/put_xxx() content: The initial content of the scope, can be ``put_xxx()`` or a list of it.
1465 :param int scope, position: Those arguments have the same meaning as for `put_text()`
1466 """
1467 if not isinstance(content, list):
1468 content = [content]
1469
1470 check_dom_name_value(name, 'scope name')
1471 dom_id = scope2dom(name, no_css_selector=True)
1472
1473 spec = _get_output_spec('scope', dom_id=dom_id, contents=content, scope=scope, position=position)
1474 return Output(spec)
1475
1476
1477class JSFunction:

Callers 3

basic_outputFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 4

check_dom_name_valueFunction · 0.85
scope2domFunction · 0.85
_get_output_specFunction · 0.85
OutputClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…