@tarojs/runtime 3.6.19 → 3.6.21

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.
@@ -431,7 +431,7 @@ declare const nav: any;
431
431
  declare let now: () => number;
432
432
  // https://gist.github.com/paulirish/1579671
433
433
  // https://gist.github.com/jalbam/5fe05443270fa6d8136238ec72accbc0
434
- declare const _raf: typeof requestAnimationFrame | ((callback: any) => NodeJS.Timeout);
434
+ declare const _raf: typeof requestAnimationFrame | ((callback: any) => NodeJS.Timer);
435
435
  declare const _caf: typeof cancelAnimationFrame;
436
436
  declare class URLSearchParams {
437
437
  #private;
@@ -248,15 +248,15 @@ function isHasExtractProp(el) {
248
248
  */
249
249
  function isParentBinded(node, type) {
250
250
  var _a;
251
- let res = false;
252
- while ((node === null || node === void 0 ? void 0 : node.parentElement) && node.parentElement._path !== ROOT_STR) {
253
- if ((_a = node.parentElement.__handlers[type]) === null || _a === void 0 ? void 0 : _a.length) {
254
- res = true;
255
- break;
251
+ while ((node = (node === null || node === void 0 ? void 0 : node.parentElement) || null)) {
252
+ if (!node || node.nodeName === ROOT_STR || node.nodeName === 'root-portal') {
253
+ return false;
254
+ }
255
+ else if ((_a = node.__handlers[type]) === null || _a === void 0 ? void 0 : _a.length) {
256
+ return true;
256
257
  }
257
- node = node.parentElement;
258
258
  }
259
- return res;
259
+ return false;
260
260
  }
261
261
  function shortcutAttr(key) {
262
262
  switch (key) {
@@ -1469,7 +1469,10 @@ class TaroElement extends TaroNode {
1469
1469
  event.defaultPrevented = true;
1470
1470
  }
1471
1471
  if (!isUndefined(result) && event.mpEvent) {
1472
- event.mpEvent[EVENT_CALLBACK_RESULT] = result;
1472
+ const res = hooks.call('modifyTaroEventReturn', this, event, result);
1473
+ if (res) {
1474
+ event.mpEvent[EVENT_CALLBACK_RESULT] = result;
1475
+ }
1473
1476
  }
1474
1477
  if (event._end && event._stop) {
1475
1478
  break;
@@ -4188,7 +4191,7 @@ function createRecursiveComponentConfig(componentName) {
4188
4191
  }
4189
4192
  }
4190
4193
  : EMPTY_OBJ;
4191
- return Object.assign({ properties: {
4194
+ return hooks.call('modifyRecursiveComponentConfig', Object.assign({ properties: {
4192
4195
  i: {
4193
4196
  type: Object,
4194
4197
  value: {
@@ -4204,7 +4207,7 @@ function createRecursiveComponentConfig(componentName) {
4204
4207
  virtualHost: !isCustomWrapper
4205
4208
  }, methods: {
4206
4209
  eh: eventHandler
4207
- } }, lifeCycles);
4210
+ } }, lifeCycles), { isCustomWrapper });
4208
4211
  }
4209
4212
 
4210
4213
  const TIMEOUT = 100;