There is this tweet on Twitter:
In JavaScript, all objects are truthy (as per the spec). In the DOM, there’s one exception to this rule. What is it? #
Ok, using this code
for (var name in document) {
if (!!document[name] === false && typeof document[name] === 'object' && document.hasOwnProperty(name)) {
$('#foo').append('document.' + name + '
');
};
};
i had this result in chrome (results may vary)
document.ownerDocument
document.attributes
document.namespaceURI
document.nextSibling
document.webkitCurrentFullScreenElement
document.nodeValue
document.preferredStylesheetSet
document.textContent
document.previousSibling
document.parentNode
document.xmlVersion
document.parentElement
document.localName
document.selectedStylesheetSet
document.prefix
document.xmlEncoding