Skip to content
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: sw fallback + client key #23

Merged
merged 11 commits into from
Nov 2, 2023
Merged

feat: sw fallback + client key #23

merged 11 commits into from
Nov 2, 2023

Conversation

AmeanAsad
Copy link
Contributor

@AmeanAsad AmeanAsad commented Oct 25, 2023

Changes:

  • Extract client key from page and inject it into the service worker.

@AmeanAsad AmeanAsad requested a review from guanzo October 25, 2023 16:08
webpack.config.js Outdated Show resolved Hide resolved
@AmeanAsad AmeanAsad marked this pull request as ready for review October 26, 2023 14:10
guanzo
guanzo previously approved these changes Oct 26, 2023
@AmeanAsad AmeanAsad changed the title feat: update sw to use fallback feat: sw fallback + client key Nov 2, 2023
@@ -52,6 +54,10 @@ function initWidget () {
return
}


const config = widgetConfigFromScriptTag()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guanzo to add some handling for when the DOM is not loaded yet, would widgetConfigFromScriptTag() return an error? That way can just add a try catch.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

Copy link
Collaborator

@DiegoRBaquero DiegoRBaquero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secondary review: LGTM

src/widget/widget.js Outdated Show resolved Hide resolved
src/widget/widget.js Outdated Show resolved Hide resolved
src/widget/widget-config.js Outdated Show resolved Hide resolved
src/sw/controller.js Outdated Show resolved Hide resolved
src/sw/controller.js Outdated Show resolved Hide resolved
@AmeanAsad AmeanAsad merged commit 905c961 into main Nov 2, 2023
1 check passed
@AmeanAsad AmeanAsad deleted the feat/update-client branch November 2, 2023 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants