You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A pattern we commonly use is to use a utility function to inject a script (for example, the filestack SDK) and keep a reference to the promise, returning it for subsequent calls so that multiple script elements don't get added to the page.
Would you be interested in a PR that adds an injectScriptOnce function that uses a map to keep track of which URLs have already been injected, and return their existing promise instead of creating a new <script> tag?
The text was updated successfully, but these errors were encountered:
A pattern we commonly use is to use a utility function to inject a script (for example, the filestack SDK) and keep a reference to the promise, returning it for subsequent calls so that multiple
script
elements don't get added to the page.Would you be interested in a PR that adds an
injectScriptOnce
function that uses a map to keep track of which URLs have already been injected, and return their existing promise instead of creating a new<script>
tag?The text was updated successfully, but these errors were encountered: