I am trying to access the title of an html div element which is on the page, from a browser extension. When I console log the element in firefox and view it in the dev tools, I get this output:
<div class="X" A="Y" B="Z" C="XX">
When I click the on the above to expand it, I get the list of element characteristics:
...
tagName: "DIV"
textContent: "what is in the text"
title: "what I want to get"
Yet, when I console log element.title I get an empty string. I get undefined when I do element.innerHTML, when there is clearly something there.