[HTML5] DOM Nodes Explained
import './assets/css/style.css'; const app = document.getElementById('app'); app.innerHTML = '<h1>JavaScript DOM</h1>'; // <html> console.log(document.documentElement); console.dir(document.documentElement); // <head> console.dir(document.head); // <body> console.dir(document.body); // retrieve the constructor name console.log(document.body.constructor.name); // looking at the prototype chain console.log(document.body instanceof HTMLBodyElement); console.log(document.body instanceof HTMLElement); console.log(document.body instanceof Element); console.log(document.body instanceof Node); console