Let's consider we have two files namely object.html & load.txt.
object.html
<!DOCTYPE html>
<body>
<object data="load.txt"></object>
</body>
</html>
load.txt
You have to load me !
Now, when I open the object.html in browser window, the content of load.txt file is shown ( as usual ), but I want the content also to show in the console, saying "The content of the text file you loaded :" and the content after that. But I am not understanding, how to console.log the content of the txt file. Can you help me ?