@@ -15,8 +15,7 @@ An end-to-end data collection platform developed by Mozilla and primarily target
1515
1616Glean provides multiple client SDKs for different programming languages and platforms.
1717One of the aspects that guide Glean SDK development is cross-platform consistency and the Glean
18- JavaScript SDK is no exception to that. It is built to work on multiple JavaScript platforms --
19- websites, and web extensions as of the time of writing -- and to be easily extendable
18+ JavaScript SDK is no exception to that. It is built to work on websites -- and to be easily extendable
2019to other platforms as well.
2120
2221The Glean JavaScript SDK is the latest addition to the family of Glean SDKs. The other Glean SDKs,
@@ -39,9 +38,7 @@ When data is submitted, the Glean SDK is responsible for assembling the correct
3938storage. Each metric can have different [ lifetimes] ( https://mozilla.github.io/glean/book/user/metrics/adding-new-metrics.html#a-lifetime-example )
4039and the SDK will manage its storage so that data does not remain in storage after it's lifetime is expired.
4140
42- The Glean SDK tries to do all of this is the least disruptive way possible to users. There are two separate
43- implementations for the SDK based on the platform: async (web extensions) and sync (browser). The implementation
44- is set inside of Glean itself and is not configurable by the user.
41+ The Glean SDK tries to do all of this is the least disruptive way possible to users.
4542
4643### async (Web Extensions)
4744
@@ -104,7 +101,7 @@ To see all the exposed entry points, check out Glean.js' `package.json` file.
104101### ` entry/ `
105102
106103The ` entry/ ` folder contains the main entry points for the Glean.js package per platform.
107- For example, when a user does ` import Glean from @mozilla/glean/webext ` it's the ` entry/webext .ts `
104+ For example, when a user does ` import Glean from @mozilla/glean/web ` it's the ` entry/web .ts `
108105file that they are getting and not ` core/glean.ts ` .
109106
110107The main difference between each platform's file is that a different ` Platform ` implementation is
@@ -123,7 +120,6 @@ It also makes testing easier, because the exact same suite of tests can be run f
123120
124121The storage module varies for each platform. The storage mechanism used by each platform is as follows:
125122- ` web ` - [ ` localStorage ` ] ( https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage )
126- - ` webext ` - [ ` storage ` ] ( https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage )
127123
128124### ` plugins/ `
129125
0 commit comments