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

XBL companion destroy method to be called when switching wizard page #4372

Closed
avernet opened this issue Jan 9, 2020 · 2 comments
Closed

Comments

@avernet
Copy link
Collaborator

avernet commented Jan 9, 2020

The destroy method should be called because:

  • A component with javascript-lifecycle might want to do its own cleanup (e.g. date control unregistering listener).
  • For all components, the XForms engine client-side code needs to remove the companion object from the list of active companion objects it keeps track of.
  • This will help us reduce memory leaks with embedding (Client-side embedding #1577).
@ebruchez
Copy link
Collaborator

ebruchez commented Jan 9, 2020

Currently, fr|tinymce doesn't support the javascript-lifecycle mode. destroy() is only called when that mode is present. So this explains that.

One way to go would be to move this component (and maybe others) to use javascript-lifecycle.

@ebruchez
Copy link
Collaborator

ebruchez commented Aug 7, 2020

Trying this with the Wizard:

  • S1 with a text control
  • S2 with an fr:number (control-2) control (which has javascript-lifecycle)
  • S1 → S2: xxf:init initializes the control
  • S2 → S1: nothing is in the response for control-2
  • S1 → S2: xxf:init again

ebruchez pushed a commit that referenced this issue Aug 10, 2020
ebruchez pushed a commit that referenced this issue Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants