-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (37 loc) · 1.33 KB
/
index.html
File metadata and controls
45 lines (37 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Playground</title>
</head>
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.2.6/dist/web3.min.js"></script>
<script src="https://apis.instadapp.io/js/web3Modal/config.js"></script>
<script src="https://apis.instadapp.io/js/web3Modal/connect.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<body>
Open console for testing
<!-- Usage in modern browsers -->
<script type="module">
import DSA from './dist/index.es.js'
InitWeb3()
// window.dsa = new DSA(window.web3)
$(window).on( "load", async function(e) {
e.preventDefault();
await InitWeb3()
window.dsa = new DSA(window.web3)
console.log(window.dsa)
});
</script>
<!-- Usage for old browsers (nomodule can be omitted) -->
<script src="dist/index.bundle.js"></script>
<script nomodule>
$(window).on( "load", async function(e) {
e.preventDefault();
await InitWeb3()
window.dsa = new DSA(window.web3)
console.log(window.dsa)
});
</script>
</body>
</html>