Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
localstripe.js: Fix LOCALSTRIPE_BASE_API on dynamical load
This continues commit c89bb15 "API: Allow serving localstripe API from a custom URL" by simplifying the way to get localstripe server URL, and also fixes the case when `localstripe.js` is loaded dynamically (in this case, `document.getElementsByTagName('script')` references the wrong element: the calling/parent `<script>`) like this: let script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://localhost:8420/js.stripe.com/v3/'; document.head.appendChild(script);
- Loading branch information