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 installWhen targetting browsers, use:
npm run devWhen targetting QML, use:
npm run dev.qmlThe 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.jsonfile. 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/webextensiondirectory. Clicking on "Inspect views background page" will show the DevTools for the add-on.
When targetting browsers, use:
npm run buildWhen targetting QML, use:
npm run build.qmlThe main difference between these two is the code that talks to the underlying storage implementation. QML does not have access to localStorage.