@lingxia/html 0.6.3 → 0.6.5

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.
@@ -134,6 +134,21 @@ var LingXiaPage = (function(exports) {
134
134
  function filterPayload(name, args) {
135
135
  const clean = [];
136
136
  for (const value of args) {
137
+ if (typeof CustomEvent !== "undefined" && value instanceof CustomEvent) {
138
+ clean.push({
139
+ type: value.type,
140
+ detail: value.detail
141
+ });
142
+ continue;
143
+ }
144
+ const maybeEvent = value;
145
+ if (maybeEvent && typeof maybeEvent === "object" && typeof maybeEvent.type === "string" && "detail" in maybeEvent) {
146
+ clean.push({
147
+ type: maybeEvent.type,
148
+ detail: maybeEvent.detail
149
+ });
150
+ continue;
151
+ }
137
152
  if (value instanceof Event) continue;
138
153
  if (value && typeof value === "object" && "stopPropagation" in value && typeof value.stopPropagation === "function") continue;
139
154
  clean.push(value);
@@ -157,6 +157,21 @@ var LingXiaPage = (function (exports) {
157
157
  var clean = [];
158
158
  for (var _i = 0, args_1 = args; _i < args_1.length; _i++) {
159
159
  var value = args_1[_i];
160
+ if (typeof CustomEvent !== "undefined" && value instanceof CustomEvent) {
161
+ clean.push({
162
+ type: value.type,
163
+ detail: value.detail
164
+ });
165
+ continue;
166
+ }
167
+ var maybeEvent = value;
168
+ if (maybeEvent && typeof maybeEvent === "object" && typeof maybeEvent.type === "string" && "detail" in maybeEvent) {
169
+ clean.push({
170
+ type: maybeEvent.type,
171
+ detail: maybeEvent.detail
172
+ });
173
+ continue;
174
+ }
160
175
  if (value instanceof Event)
161
176
  continue;
162
177
  if (value && typeof value === "object" && "stopPropagation" in value && typeof value.stopPropagation === "function")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxia/html",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "private": false,
5
5
  "description": "LingXia HTML runtime for lxapp pages",
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "prepublishOnly": "npm run build"
22
22
  },
23
23
  "dependencies": {
24
- "@lingxia/page-runtime": "0.6.3"
24
+ "@lingxia/page-runtime": "0.6.5"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@lingxia/page-runtime": "file:../lingxia-page-runtime",