Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. DocumentFragment
  4. lastElementChild

DocumentFragment: lastElementChild property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2018.

TheDocumentFragment.lastElementChild read-only propertyreturns the document fragment's last childElement, ornull if thereare no child elements.

Value

AnElement that is the last childElement of the object, ornull if there are none.

Examples

js
let fragment = new DocumentFragment();fragment.lastElementChild; // nulllet paragraph = document.createElement("p");fragment.appendChild(paragraph);fragment.lastElementChild; // <p>

Specifications

Specification
DOM
# ref-for-dom-parentnode-lastelementchild①

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp