Chrome Apps can use the Chrome.usb and Chrome.hid apis.
These are deprecated, when writing Chrome extensions.
Is it possible to use web.usb or web.hid in the popup html?
In my popup.js this
if ("hid" in navigator)
returns "True"
Yes, you can access WebUSB and WebHID from the extension's background page however requesting permission to access a device requires making a call from a tab (not a pop-up or the background page).
Note that the background page is deprecated with Manifest V3. Extensions are expected to migrate to Service Workers. Currently, WebUSB and WebHID are not accessible from Service Workers. Supporting this is being investigated in https://crbug.com/1303193 and https://crbug.com/1303195.
Related
When navigating to "native massaging" documentation, first thing you see is a warning:
Important: Chrome will be removing support for Chrome Apps on all
platforms. Chrome browser and the Chrome Web Store will continue to
support extensions. Read the announcement and learn more about
migrating your app.
Since all this documentation located under Chrome Apps docs, is it means that "native messaging" feature going away as well? If it is, what is the alternative for communicating with chrome extension from the outside?
I am working on a webextension that will inject some ui in some pages. this ui will mostly be inside an iframe to better isolate css.
the problem I have is that I can do browser calls from inside the iframe scripts on chrome (I am also using webextension-polyfill) but in firefox I get browser is not defined error.
Am I missing something?
it seems like the errors I get are a firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1443253
a relevant comment on the bug page says
Chrome supports out-of-process frames, so Chrome is able to render an extension frame in an extension process (and the iframe can safely be granted access to extension APIs - https://bugs.chromium.org/p/chromium/issues/detail?id=550151 ).
In contrast, Firefox does not support out-of-process frames, so the iframe is handled by a non-extension process (with only limited access to extension APIs).
This is something like a chrome extension changes the elements of a web page dynamically.
I am wondering if i can change the DOM elements of a chrome app from another chrome app or extension.
If this is possible, how can I do that ?
========================================================
Example:
There is a standalone chrome app working on the desktop
There is another app / extension works like a chrome app debugging tool which can access the content of that standalone app
The answer can be no, since when you are saying the DOM elements of a chrome extension, I guess you mean the popup/options page for the extension, its url starts with chrome://extensions while content script can't access this kind of page.
The answer can also be yes, since if you have control on both of the extension, you can do Cross-extension messaging, in this way, to some degree you can achieve change the DOM of a chrome extension from another extension.
I'm writing an extension.
A part of this extension contains an html page.
I'd call that page, also as a Google Apps,
inserting an icon between applications of chrome.
It's possible create a manifest file to integrate the chrome app with chrome extension?
No. You'd create both an app an an extension, then encourage the user to install both if you detected that one wasn't installed.
There is an outstanding feature request to allow bundled installations of multiple apps/extensions.
In the Google Chrome developer window, there is a Network tab that shows you all the resources that a web page loads over time. Is there a way to access this data in a Google Chrome extension?
CLARIFICATION: I want to make a Chrome extension that needs to read this data and do something based on what it reads. So I should have asked, "is there a Chrome Extension API that allows this?"
There is experimental API for accessing network resources. Being experimental means that to use it users need to enable experimental API flag in their settings, plus you won't be able to submit such extension to the gallery.
Right click on the web page, select "Inspect Element", select the network tab then refresh