연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
차단 > 차단 > getRootBlock
Block.getRootBlock() 메서드
이 블록의 트리에서 최상위 블록을 반환합니다. 이 블록이 최상위 수준에 있으면 자체 반환됩니다.
서명:
getRootBlock(): this;
반환:
이
루트 블록
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-21(UTC)
[null,null,["최종 업데이트: 2024-08-21(UTC)"],[[["The `getRootBlock()` method identifies and returns the top-level block within a block's hierarchy."],["If the block calling the method is already at the top level, the method will return the block itself."],["It helps in navigating and understanding the structure of block trees in Blockly."]]],["The `Block.getRootBlock()` method identifies the highest block in a block's tree structure. If the block itself is at the top level, the method returns that block. Otherwise, it traces upwards to find and return the root, or top-most, block. The method's signature is `getRootBlock(): this;`, and its return value is \"this,\" representing the root block.\n"]]