This project is a proof-of-concept. It's only purpose was to help the Glean team understand all the constraints and caveats of building an implementation of Glean that works on Javascript environments. The code here is ugly, untested and experimental. DO NOT USE IT IN PRODUCTION.
Pronounced (gleanjas)
npm install
When targetting browsers, use:
npm run dev
When targetting QML, use:
npm run dev.qml
The main difference between these two is the code that talks to the underlying storage implementation. QML does not have access to localStorage.
npm test
-
Copy the output of the build step (i.e.
glean.js
) tosamples/webextension/
. This is required as it's not possible, from the manifest file, to directly reference../../dist/glean.js
. -
Load the extension in the browser (either Firefox or Chrome will work):
a. Firefox: in a Nightly build, go to
about:debugging
, then "This Nightly" and click on "Load Temporary Add-on". Select themanifest.json
file. Then, by clicking "Inspect", the DevTools for the add-on will appear. b. Chrome: go tochrome://extensions/
, then click on "Load unpacked" and select thesamples/webextension
directory. Clicking on "Inspect views background page" will show the DevTools for the add-on.
When targetting browsers, use:
npm run build
When targetting QML, use:
npm run build.qml
The main difference between these two is the code that talks to the underlying storage implementation. QML does not have access to localStorage.