mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
events
This commit is contained in:
11
src/lib/utils/events.js
Normal file
11
src/lib/utils/events.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export function send (payload) {
|
||||
console.log(payload)
|
||||
if (!window.sendEvent) {
|
||||
return
|
||||
}
|
||||
|
||||
const event = new CustomEvent('sqliteviz-app-event', {
|
||||
detail: payload
|
||||
})
|
||||
window.dispatchEvent(event)
|
||||
}
|
||||
Reference in New Issue
Block a user