.text will retrieve an empty string of the text in not present in the view port, so you can sroll the object into the viewport and try .text it should retrive the value.
On the contrary innerhtml can get the value even of it is present out side the view port