-
Notifications
You must be signed in to change notification settings - Fork 0
Fix browser strangeness #59
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
Conversation
| const handlePopupReadyEvent = (event) => { | ||
| // we get a document Fragment in event.detail we replace it with the root | ||
| // replaceChild method consumes the documentFragment content, subsequent calls will be no-op. | ||
| if (e.detail.childElementCount === 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rouilj I have extensively checked this behavior in all browsers and subsequent calls will not have the documentFragment with content inside as it's consumed here with replaceChild.
Thus eliminating our need to debounce and worry about document fragments need to be destroyed.
replaceChild consumes the fragment content leaving it empty, and the reference to it also gets cleaned up when either we remove the listener or popup window is closed
| } | ||
|
|
||
| ClassHelper.translations = translations; | ||
| ClassHelper.translations = json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this is an artifact from another local branch that I was trying to solve, translations stopped working
This solves the problem where I was not attaching the API response to the member field
rouilj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Please put this on main. I have to head out in a few minutes and will be at work tomorrow.
I'll do testing over the weekend.
@rouilj I have refactored according to the code review comments