Baseline Widely available
The Document.lastElementChild
read-only property returns the document's last child Element
, or null
if there are no child elements.
For HTML documents, this is usually the only child, the root <html>
element.
See Element.lastElementChild
for the last child element of specific elements within a document.
The root <html>
element.
document.lastElementChild;
// returns the root <html> element, the only child of the document
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4