We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab61949 commit 4b1caf6Copy full SHA for 4b1caf6
dapp-example/index.html
@@ -23,8 +23,8 @@
23
})
24
25
// 监听Bytom插件加载成功事件
26
- document.addEventListener('chromeBytomLoaded', () => {
27
- console.log('chromeBytomLoaded')
+ document.addEventListener('bytomLoaded', () => {
+ console.log('bytomLoaded')
28
bytom = window.bytom
29
30
</script>
src/content.js
@@ -45,6 +45,7 @@ class Content {
45
// Dispatching the loaded event to the web application.
46
isReady = true
47
48
+ document.dispatchEvent(new CustomEvent('bytomLoaded'))
49
document.dispatchEvent(new CustomEvent('chromeBytomLoaded'))
50
51
0 commit comments