JSFiddle - React, Tailwind, and code Playground

by seong gyun jeon

JavaScript

// DocumentNode 검사
console.log(Node.DOCUMENT_NODE === window.document.nodeType); // true

// ElementNode 검사
console.log(Node.ELEMENT_NODE === window.document.documentElement.nodeType); // true

console.log(Node.ELEMENT_NODE === window.document.body.nodeType); // true

// 

console.log(Node.DOCUMENT_FRAGMENT_NODE === document.createDocumentFragment().nodeType); // true