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)
| 1457 | |
| 1458 | @safely_destruct_output_when_exp('content') |
| 1459 | def 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 | |
| 1477 | class JSFunction: |
no test coverage detected
searching dependent graphs…