This repository has been archived by the owner on Mar 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sdk): initialize Aztec when document is ready
- Loading branch information
Showing
6 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -492,4 +492,4 @@ class Connection { | |
} | ||
} | ||
|
||
export default new Connection(); | ||
export default Connection; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import Aztec from '~/client/Aztec'; | ||
|
||
window.aztec = new Aztec(); | ||
document.addEventListener('DOMContentLoaded', () => { | ||
window.aztec = new Aztec(); | ||
|
||
// TODO - callback's name should be configurable through url: | ||
// /sdk/aztec/?key=API_KEY&callback=aztecCallback | ||
if (typeof window.aztecCallback === 'function') { | ||
window.aztecCallback(); | ||
} | ||
// TODO - callback's name should be configurable through url: | ||
// /sdk/aztec/?key=API_KEY&callback=aztecCallback | ||
if (typeof window.aztecCallback === 'function') { | ||
window.aztecCallback(); | ||
} | ||
}); |