Skip to content

CHI-3855: Capture data attributes from the current script so they can be used in event handlers#4284

Merged
stephenhand merged 4 commits intomasterfrom
CHI-3855-fix_script_attributes
May 1, 2026
Merged

CHI-3855: Capture data attributes from the current script so they can be used in event handlers#4284
stephenhand merged 4 commits intomasterfrom
CHI-3855-fix_script_attributes

Conversation

@stephenhand
Copy link
Copy Markdown
Collaborator

Description

Aselo Webchat runs code from window event handlers rather than directly from the script, which means document.currentScript is null, because it's fired on an event, not a script

This PR captures the data attributes on the script tag ahead of time so they can still be used to override configurations in code running in event handlers

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P

@stephenhand stephenhand requested a review from gpaoloni May 1, 2026 09:36
@stephenhand stephenhand merged commit af84ca1 into master May 1, 2026
28 checks passed
@stephenhand stephenhand deleted the CHI-3855-fix_script_attributes branch May 1, 2026 10:06
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.

1 participant