🌎
web.dev
search
Ctrlk
  • 🌏web.devchevron-right
  • ⚙️toolschevron-right
  • 🔰HTMLchevron-right
  • 🔰CSSchevron-right
  • 🍒JSchevron-right
  • 🔰web componentchevron-right
  • 🌐browserchevron-right
    • 📘web APIchevron-right
    • 🔰conceptschevron-right
    • 🔰Eventchevron-right
    • 🔰DOMchevron-right
      • 🔰DOM hierarchy
      • 🔰querying elementschevron-right
      • 🔰traversing DOM
      • 🔰create/insert/delete nodeschevron-right
      • 🌿DOM typeschevron-right
        • 📘Nodechevron-right
        • 📘Elementchevron-right
          • 🔸element content
          • 🔹.insertAdjacentHTML()
          • 🔸attributechevron-right
          • 🔰box models
          • 👔Element+boxeschevron-right
          • 👔Element+extchevron-right
        • 🍄HTMLElementchevron-right
        • 📘Documentchevron-right
        • 📘Windowchevron-right
        • 🍄DocumentFragment
        • 🍄NodeListchevron-right
        • CSSStyleDeclaration
      • ✨DOM examples
      • 👔custom methodschevron-right
    • 🔰SVGchevron-right
    • 🔳<canvas>chevron-right
    • 🔰storage
    • 🔰animationchevron-right
  • 🔰Reactchevron-right
  • Serverchevron-right
  • 🔖附錄
    • 👔customchevron-right
    • 🧩three.jschevron-right
    • 🅰️Google Apps Scriptchevron-right
    • 📖JSDocchevron-right
    • 📦data structurechevron-right
    • 🔰algorithmchevron-right
    • 🔰paradigmchevron-right
    • 🔰TypeScriptchevron-right
    • 💎resourcechevron-right
gitbookPowered by GitBook
block-quoteOn this pagechevron-down
  1. 🌐browserchevron-right
  2. 🔰DOMchevron-right
  3. 🌿DOM types

📘Element

browser ⟩ DOM ⟩ type ⟩ Element

  • instance properties

    • parentNodearrow-up-right (Nodearrow-up-right) - defined in Node

    • childrenarrow-up-right (HTMLCollectionarrow-up-right) - includes only Element nodes.

    • childElementCountarrow-up-right (Number) - === children.length.

    • firstElementChildarrow-up-right (Elementarrow-up-right | null)

    • lastElementChildarrow-up-right (Elementarrow-up-right | null)

    • nextElementSiblingarrow-up-right (Elementarrow-up-right | null)

    • previousElementSiblingarrow-up-right (Elementarrow-up-right | null)

  • custom methods

    • elem.isInside()

    • elem.isHeading

    • elem.attr()

    • elem.styleProp()

    • elem.showDataAttr()

Drawing
  • attribute

  • Element+ext

  • element content

  • size & position

    • coordinates

    • box models

    • .boundingBox

    • .scrollBox

    • element .paddingBox

    • window scrolling

  • DOM manipulation

    • querying elements

    • create/insert/delete nodes

    • str.htmlToElement()

  • doc.elementFromPoint()

  • MDN ⟩ EventTargetarrow-up-right ⟩ Nodearrow-up-right ⟩ Elementarrow-up-right

  • Document.documentElementarrow-up-right - <html> element.

  • Node - super class.

  • traversing DOM

  • HTML ⟩ element

PreviousnewElement()chevron-leftNextelement contentchevron-right

Last updated 3 years ago