@nookuio/iframe 0.3.0 → 0.4.0
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.
- package/dist/createClient.js +6 -3
- package/dist/createClient.mjs +3 -3
- package/package.json +1 -1
package/dist/createClient.js
CHANGED
|
@@ -110,9 +110,12 @@ function createClient(localCtx, options) {
|
|
|
110
110
|
return unsubscribeHandler;
|
|
111
111
|
}
|
|
112
112
|
if (prop === "emit") {
|
|
113
|
-
const emitHandler =
|
|
114
|
-
|
|
115
|
-
emit(
|
|
113
|
+
const emitHandler = (eventName, ...args) => {
|
|
114
|
+
args = args.map(arg => serialize(arg));
|
|
115
|
+
emit({
|
|
116
|
+
eventName,
|
|
117
|
+
args
|
|
118
|
+
});
|
|
116
119
|
};
|
|
117
120
|
return emitHandler;
|
|
118
121
|
}
|
package/dist/createClient.mjs
CHANGED
|
@@ -99,9 +99,9 @@ export function createClient(localCtx, options) {
|
|
|
99
99
|
return unsubscribeHandler;
|
|
100
100
|
}
|
|
101
101
|
if (prop === "emit") {
|
|
102
|
-
const emitHandler = (
|
|
103
|
-
|
|
104
|
-
emit(
|
|
102
|
+
const emitHandler = (eventName, ...args) => {
|
|
103
|
+
args = args.map((arg) => serialize(arg));
|
|
104
|
+
emit({ eventName, args });
|
|
105
105
|
};
|
|
106
106
|
return emitHandler;
|
|
107
107
|
}
|