mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
events refactor
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
export function send (payload) {
|
||||
console.log(payload)
|
||||
export function send (name, value, labels) {
|
||||
console.log(name, value, labels)
|
||||
|
||||
const event = new CustomEvent('sqliteviz-app-event', {
|
||||
detail: payload
|
||||
detail: {
|
||||
name,
|
||||
value,
|
||||
labels
|
||||
}
|
||||
})
|
||||
window.dispatchEvent(event)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user