-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support web worker env #467
Conversation
096375d
to
cd5e7fe
Compare
cd5e7fe
to
16c6fac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great! Thanks for the detailed docs.
16c6fac
to
415a963
Compare
415a963
to
7581abf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good to me. Thanks for making the changes and document it.
🎉 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 |
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.
window
object if it exists; otherwise, useself
object.document
object if it exists; otherwise, exit early or use fallbacks/default values.WorkerStorage
) to use as an alternative forlocalStorage
implementing the same interfaceWorkerStorage
with cookies, localStorage, sessionStorage APIs unavailable.Usage
app.js
worker.js
Checklist