Remove unused client event for iframe-loaded
This commit is contained in:
parent
4e4e07d1f2
commit
f14e6d8e22
|
@ -36,7 +36,6 @@
|
||||||
// Messages that can be sent from the iframe preview to the builder
|
// Messages that can be sent from the iframe preview to the builder
|
||||||
// Budibase events are and initalisation events
|
// Budibase events are and initalisation events
|
||||||
const MessageTypes = {
|
const MessageTypes = {
|
||||||
IFRAME_LOADED: "iframe-loaded",
|
|
||||||
READY: "ready",
|
READY: "ready",
|
||||||
ERROR: "error",
|
ERROR: "error",
|
||||||
BUDIBASE: "type",
|
BUDIBASE: "type",
|
||||||
|
@ -157,6 +156,10 @@
|
||||||
|
|
||||||
const handleBudibaseEvent = event => {
|
const handleBudibaseEvent = event => {
|
||||||
const { type, data } = event.data || event.detail
|
const { type, data } = event.data || event.detail
|
||||||
|
if (!type) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (type === "select-component" && data.id) {
|
if (type === "select-component" && data.id) {
|
||||||
store.actions.components.select({ _id: data.id })
|
store.actions.components.select({ _id: data.id })
|
||||||
} else if (type === "update-prop") {
|
} else if (type === "update-prop") {
|
||||||
|
|
|
@ -84,7 +84,6 @@ export default `
|
||||||
if (window.loadBudibase) {
|
if (window.loadBudibase) {
|
||||||
window.loadBudibase()
|
window.loadBudibase()
|
||||||
document.documentElement.classList.add("loaded")
|
document.documentElement.classList.add("loaded")
|
||||||
window.parent.postMessage({ type: "iframe-loaded" })
|
|
||||||
} else {
|
} else {
|
||||||
throw "The client library couldn't be loaded"
|
throw "The client library couldn't be loaded"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue