-
Notifications
You must be signed in to change notification settings - Fork 131
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: Fetch support #898
feat: Fetch support #898
Conversation
# Conflicts: # src/extensions/replay/sessionrecording.ts
# Conflicts: # src/storage.ts
Size Change: +6.18 kB (+1%) Total Size: 772 kB
ℹ️ View Unchanged
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant. |
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.
In general, 👍
I do know that we have people using posthog-js with IE11, who might be affected by this if we (eventually) slim the bundle and remove the old XHR route. Not sure what to do with them
I don't think we need to remove it tbh. Main thing is this unblocks certain envs where only fetch is supported which is good enough for now |
Changes
Fixes #547
Some environments don't support xhr at all anymore like chrome extensions. This PR adds fetch as the default method when available.
This PR makes it possible to set the
api_transport
to fetch.It also deprecates support for the
on_xhr_error
in a slightly breaking way. Decided it is better to not call it than to call it with a broken interface. This should have a low impact (it is anyways edge casey in terms of only getting called when things fail).TODO
Checklist