-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Legacy Widget: Improve backwards compatibility (#30709)
* Legacy Widget: Improve backwards compatibility - Fire 'widget-added' and 'widget-updated' events when the widget form is initialized or when it changes. This is what most widgets' scripts use to initialize and/or attach event listeners. - Include hidden inputs that most widgets expect to exist in the DOM. * Fix Legacy Widget E2E test * Add onSave to deps Co-authored-by: Kai Hao <kevin830726@gmail.com> * Add setFormData to deps Co-authored-by: Kai Hao <kevin830726@gmail.com> * Import jquery instead of accessing from window * Remove unnecessary useCallback * Widgets E2E tests: Query by label instead of id * Replace querySelector with extra ref * Revert "Import jquery instead of accessing from window" This reverts commit 4d591c5. * Add fallback if jQuery does not exist Co-authored-by: Kai Hao <kevin830726@gmail.com>
- Loading branch information
1 parent
9e6ee0a
commit bf5432c
Showing
2 changed files
with
140 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters