M
M
Maxim K2022-04-16 23:12:32
JavaScript
Maxim K, 2022-04-16 23:12:32

How to track page modal window in chrome extension?

I'm making an extension for chrome. When I open the page, I collect values ​​into variables through the DOM, and it all works. When I click a button on the site, a modal window appears in which you need to enter data. I wrote the code in background.js, when opening a modal window, the script does not reload. Maybe there are examples of how I can implement my plans? I don’t write my code here, because so far there are only 2 lines with the collection of information through document.query.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dollar, 2022-04-17
@dollar

MutationObserver
Well, either a crutch through setInterval ().

D
Dmitry Entelis, 2016-10-01
@DmitriyEntelis

stackoverflow.com/questions/8809943/how-to-select-...
But in general imho this is the worst perversion and hole.
It's better not to do that at all.

S
Sparton, 2016-10-14
@Sparton

Pretty strange design for netcat.
Judging by the fields, do you want to get a list of products from different tables?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question