Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access Firefox's DOM (or HTML content) from outside firefox

I have a question:

My program will search FireFox windows opened by user. When a user open Firefox and enter any site, I want to search for a keyword in that page's HTML content.

How can I access Firefox's Active Tab's DOM (or HTML content) from outside firefox using my C++ program.

Is it possible? If so, can you give me some idea or links?

If it is not possible, how can I copy text to clipboard within Firefox without installing / setting up anything?

Best regards, Nuri Akman

like image 311
Nuri Akman Avatar asked Oct 14 '22 15:10

Nuri Akman


2 Answers

There is no built-in way to access the DOM of a web page inside Firefox from an external program. You can write an extension that implements some sort of IPC (using sockets or whatever) and communicate with that, but not built-in to Firefox.

like image 110
Ted Mielczarek Avatar answered Oct 18 '22 18:10

Ted Mielczarek


It can be done through addons

like image 26
Umair Ahmed Avatar answered Oct 18 '22 17:10

Umair Ahmed