Repository navigation
feat: support web worker env - #467
Merged
Merged
Conversation
kevinpagtakhan
force-pushed
the
AMP-29590-web-worker-support
branch
from
December 14, 2021 06:36
096375d to
cd5e7fe
Compare
kevinpagtakhan
force-pushed
the
AMP-29590-web-worker-support
branch
from
December 14, 2021 08:51
cd5e7fe to
16c6fac
Compare
kevinpagtakhan
marked this pull request as ready for review
December 14, 2021 09:48
justin-fiedler
suggested changes
Dec 14, 2021
kevinpagtakhan
force-pushed
the
AMP-29590-web-worker-support
branch
from
December 15, 2021 07:05
16c6fac to
415a963
Compare
kevinpagtakhan
force-pushed
the
AMP-29590-web-worker-support
branch
from
December 15, 2021 07:14
415a963 to
7581abf
Compare
justin-fiedler
suggested changes
Dec 15, 2021
qingzhuozhen
left a comment
Contributor
There was a problem hiding this comment.
Overall this looks good to me. Thanks for making the changes and document it.
justin-fiedler
approved these changes
Dec 20, 2021
This was
linked to
issues
Dec 21, 2021
|
🎉 This PR is included in version 8.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
@qingzhuozhen / @justin-fiedler FYI: 52abaf0#r62368057 This PR does break importing from node added in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
https://amplitude.atlassian.net/wiki/spaces/GOV/pages/1708655504/JS-SDK+Web+Worker+Support+for+amplitude-js
This PR add support to JS SDK usage in web worker.
windowobject if it exists; otherwise, useselfobject.documentobject if it exists; otherwise, exit early or use fallbacks/default values.WorkerStorage) to use as an alternative forlocalStorageimplementing the same interfaceWorkerStoragewith cookies, localStorage, sessionStorage APIs unavailable.Usage
app.js
worker.js
Checklist