Last active
March 1, 2023 09:29
-
-
Save fewlme/f7ce5a9237c2c897946059772169462f to your computer and use it in GitHub Desktop.
Load Hatch JS in Vue/React/etc setups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ******************************************************************************** | |
| Please add this script once the application is mounted/loaded (e.g. HTML has been loaded, componentDidMount/useEffect in React, etc) | |
| ********************************************************************************* */ | |
| let HatchScript = document.createElement('script'); | |
| HatchScript.setAttribute('src', 'https://cdn.gethatch.com/hatch-buy-now-request-1.0.stable.js'); | |
| document.body.appendChild(HatchScript); | |
| HatchScript.onload = function () {HatchRequest.init()}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment