If you get an HTML element or object and you enumerate the properties many are not listed.
IIRC any properties on the super classes are not enumerated.
// get selected option and add its properties to an array
var object = myDropdown.selectedOptions[0];
for (var property in object) {
properties.push(property + ":" + object[property]);
}
console.log(properties);
// output with some formatting applied
object {
_anySiblingsSelectorHash false
_attributes: {}
_childrenSelectorHash false
_computedStyleMatchers: {}
_domClient: {}
_firstChild: {}
_lastChild: {}
_layoutInfo: {}
_mutation -9007199254740991
_namespaceURI http://www.w3.org/1999/xhtml
_nativeId 64
_nestedSelectorHash false
_nextSibling: {}
_nextSiblingSelectorHash false
_nodeName option
_ownerDocument: {}
_parentNode: {}
_previousSibling null
_properties [object Map]
_scrollInfo: {}
_style: {}
oncancel undefined
onchange undefined
onclick undefined
onclose undefined
onerror undefined
onfocus undefined
oninput undefined
onkeydown undefined
onkeyup undefined
onload undefined
onsubmit undefined
}
Notice in the list above that innerHTML
and innerText
are not listed but both are properties of an option
object.