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

Tokens are not injected into dynamically created DOM elements #148

Closed
forgedhallpass opened this issue Sep 17, 2020 · 2 comments
Closed

Comments

@forgedhallpass
Copy link
Collaborator

Some applications or libraries might dynamically create DOM elements, for which the current solution does not cater for.
(e.g. some versions of ExtJS create a FORM element inside an IFRAME to handle file uploads

This specific scenario could be solved by creating a MutationObserver, then inject the tokens to the newly created elements if applicable. Adding such an observer/listener might have a significant impact on the performance, so this should be made configurable through the properties file.

@forgedhallpass
Copy link
Collaborator Author

Since the default MutationObserver implementation is asynchronous, there might be corner-case race conditions between dynamically created and submitted forms and the time the MutationObserver is being invoked by the browser. In order to cater for this special case, a configurable event can be introduced because JavaScript events are executed synchronously. After a dynamic DOM element creation which requires token injection the integrator client has to manually fire an event with the name defined in the properties file.

@forgedhallpass
Copy link
Collaborator Author

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

No branches or pull requests

1 participant