@knowlearning/agents 0.9.31 → 0.9.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,9 +22,8 @@ export default function browserAgent(options={}) {
|
|
|
22
22
|
|
|
23
23
|
const copy = x => JSON.parse(JSON.stringify(x))
|
|
24
24
|
|
|
25
|
-
const watchers = {}
|
|
26
|
-
|
|
27
25
|
function embed(environment, iframe) {
|
|
26
|
+
const watchers = {}
|
|
28
27
|
const postMessageQueue = []
|
|
29
28
|
const listeners = {}
|
|
30
29
|
let frameLoaded = false
|
|
@@ -159,6 +158,7 @@ function embed(environment, iframe) {
|
|
|
159
158
|
postMessage({ type: 'setup', session })
|
|
160
159
|
await new Promise(r => setTimeout(r, 100))
|
|
161
160
|
}
|
|
161
|
+
if (listeners.open) listeners.open()
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
function remove () {
|