isDocumentRootBox property
bool
get
isDocumentRootBox
Whether current box is the root of the document which corresponds to HTML element in dom tree.
Implementation
bool get isDocumentRootBox {
// Get the outer box of overflow scroll box
RenderBoxModel currentBox = isScrollingContentBox ? parent as RenderBoxModel : this;
// Root element of document is the child of viewport.
return currentBox.parent is RenderViewportBox;
}