I write a simple html:
<!DOCTYPE html>
<html>
<body>
<div>Hi</div>
</body>
</html>
and this simple script on google chrome:
var div = document.querySelector('div');
console.log(div.parentNode.innerHTML);
console.log("%O",div);
then the console print out the innerHTML and the object.
expending the object then find out the value of parentNode is null.
I know the parentNode is one of the properties of node object, but what inside this variable?
it's a pointer? sub-object? function?
if it's a sub-object, would it be wasting memory to storage an object inside another object as the member variable?