Fix /parity-utils/{web3,parity}.js webpack errors (#3221)
* Don't override library builds * Don't override libraries on build * Enhance working blockNumber display
This commit is contained in:
@@ -6,8 +6,33 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="icon" href="/parity-logo-black-no-text.png" type="image/png">
|
||||
<title>dev::Web3</title>
|
||||
<script src="/parity-utils/web3.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
border-radius: 0.5em;
|
||||
background: #eee;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/parity-utils/web3.js"></script>
|
||||
<div class="box">
|
||||
best block #<span id="blockNumber">unknown</span>
|
||||
</div>
|
||||
<script>
|
||||
window.setInterval(function () {
|
||||
window.web3.eth.getBlockNumber(function (error, blockNumber) {
|
||||
if (error) {
|
||||
console.error('error', error);
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById('blockNumber').innerHTML = blockNumber;
|
||||
});
|
||||
}, 1000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user