How Chrome App (not Extension) can read DOM element of page hosting app install button -


For my Chrome app, I follow the guide, and when a website clicks on the user installation button, the app Installs

installation time (i.e. chrome.runtime.onInstalled.addListener (function () {}) in background.js ), how Can the app read the DOM Element or Javascript variable (the ID of the logged site visitors) from the HTML page to install the AOM page?
All Online Advice I found, Using Content Script for Extensions The above guide says: "Extensions can communicate with embedding pages through content scripts"

What is a solution for the application?

Sorry, but I do not believe that apps are able to reach the underlying page But they are established at all. The idea is that they should have a sandbox in their personal universe and not be able to influence anything outside their window.

Extensions, on the other hand, have been created to be able to access DOM in web pages.

Therefore, I believe that what you ask will require you to create an extension instead of the app.

If you need to interact with some app in your app from the web page, then look for any other (bandout) method to do this.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -