Hi.Events
Hi.Events copied to clipboard
fix: get the script by id instead of depending on document.currentScr…
Refactor the current method for getting the current script to make it more reliable. Fixes #676.
Improvements to widget script handling:
- Updated the widget script identification logic to use
document.getElementById('hievent-widget-script')instead of relying ondocument.currentScript, ensuring the script is explicitly located and validated. This change was applied in bothfrontend/public/widget.jsandfrontend/src/embed/widget.jsfor consistency. [1] [2] - Modified the
embedScriptin theWidgetEditorcomponent to include theid="hievent-widget-script"attribute, aligning it with the updated script identification logic.
(sorry for the import re-organise):
- imports in
frontend/src/components/common/WidgetEditor/index.tsxre-ordered. I opened Hi.Events in the wrong IDE Workspace (sorry!).