Praveen Dias
Praveen Dias

Reputation: 79

Detecting UI Elements of Browser Extension using JavaScript

In the Google Chrome browser, I have installed the 'Roboform' extension. This extension creates some UI elements as shown in the below screenshot. See the popup (Localhost) near login username input.

enter image description here

Question: Is there a way to detect 'Roboform' created UI elements with JavaScript?

What I have tried

Upvotes: 0

Views: 372

Answers (1)

Kamal Surendra
Kamal Surendra

Reputation: 38

Steps

  1. Ctrl+Shift+I Or RightClick->Inspect to open dev tools
  2. Ctrl+Shift+C Or Click on the Selection Tool

enter image description here

  1. Select the UI component you want with the selection tool.
  2. You can see it is under a closed #shadow-root 'div.overlay-content-mini'

enter image description here

If you want to know more about Shadow DOM, read the following article.

What the Heck is Shadow DOM?

Note: Closed shadow roots are not very useful. Some developers will see closed mode as an artificial security feature. Read more here.

enter image description here

Upvotes: 1

Related Questions