Node: hasChildNodes() メソッド - Web API | MDN
hasChildNodes() は Node インターフェイスのメソッドで、この Node に子ノードがあるかどうかを示す論理値を返します。