()
| 409 | }); |
| 410 | |
| 411 | const notifyEditor = () => { |
| 412 | const event = new Event(`${type}-editor`, { bubbles: true }); |
| 413 | script.dispatchEvent(event); |
| 414 | }; |
| 415 | |
| 416 | if (isSetup) { |
| 417 | context.handleEvent({ currentTarget: null, script }).then(notifyEditor); |