@tarojs/runtime 4.0.0-beta.11 → 4.0.0-beta.110
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/LICENSE +8 -8
- package/dist/bom/URL.js.map +1 -1
- package/dist/bom/URLSearchParams.js.map +1 -1
- package/dist/bom/history.js.map +1 -1
- package/dist/bom/location.js.map +1 -1
- package/dist/bom/raf.d.ts +1 -0
- package/dist/bom/raf.js.map +1 -1
- package/dist/bom/window.d.ts +1 -0
- package/dist/bom/window.js.map +1 -1
- package/dist/dom/anchor-element.js.map +1 -1
- package/dist/dom/class-list.js.map +1 -1
- package/dist/dom/document.js.map +1 -1
- package/dist/dom/element.js.map +1 -1
- package/dist/dom/event-target.js.map +1 -1
- package/dist/dom/event.js.map +1 -1
- package/dist/dom/form.js +1 -1
- package/dist/dom/form.js.map +1 -1
- package/dist/dom/node.js +2 -2
- package/dist/dom/node.js.map +1 -1
- package/dist/dom/root.js.map +1 -1
- package/dist/dom/style.js.map +1 -1
- package/dist/dom/style_properties.js.map +1 -1
- package/dist/dom/tree.js.map +1 -1
- package/dist/dom-external/element.js.map +1 -1
- package/dist/dom-external/index.js.map +1 -1
- package/dist/dom-external/inner-html/html.js.map +1 -1
- package/dist/dom-external/inner-html/parser.js.map +1 -1
- package/dist/dom-external/inner-html/scaner.js.map +1 -1
- package/dist/dom-external/inner-html/style.js.map +1 -1
- package/dist/dom-external/inner-html/tags.js +4 -4
- package/dist/dom-external/inner-html/tags.js.map +1 -1
- package/dist/dom-external/inner-html/utils.js.map +1 -1
- package/dist/dom-external/mutation-observer/implements.js.map +1 -1
- package/dist/dom-external/mutation-observer/index.js.map +1 -1
- package/dist/dom-external/node.js +1 -0
- package/dist/dom-external/node.js.map +1 -1
- package/dist/dsl/common.d.ts +1 -0
- package/dist/dsl/common.js +6 -1
- package/dist/dsl/common.js.map +1 -1
- package/dist/hydrate.js +9 -2
- package/dist/hydrate.js.map +1 -1
- package/dist/index.cjs.d.ts +16 -14
- package/dist/index.cjs.js +56 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/instance-4c64b022.d.ts +6 -14
- package/dist/next-tick.js.map +1 -1
- package/dist/perf.d.ts +3 -1
- package/dist/perf.js +24 -3
- package/dist/perf.js.map +1 -1
- package/dist/polyfill/array.js.map +1 -1
- package/dist/polyfill/index.js.map +1 -1
- package/dist/polyfill/intersection-observer.js +4 -3
- package/dist/polyfill/intersection-observer.js.map +1 -1
- package/dist/polyfill/object.js.map +1 -1
- package/dist/runtime.esm.d.ts +16 -14
- package/dist/runtime.esm.js +54 -15
- package/dist/runtime.esm.js.map +1 -1
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lodash.d.ts +2 -1
- package/dist/utils/lodash.js +11 -1
- package/dist/utils/lodash.js.map +1 -1
- package/package.json +15 -23
package/dist/index.cjs.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import { Shortcuts, Events } from "@tarojs/shared";
|
|
2
|
-
import VueCtor from "vue";
|
|
3
|
-
import { ComponentOptions, VNode } from "vue";
|
|
4
4
|
import { Component as Vue3Component } from "@vue/runtime-core";
|
|
5
5
|
import { Component, ComponentClass } from "react";
|
|
6
|
-
import { CombinedVueInstance } from "vue/types/vue";
|
|
7
6
|
declare class ClassList {
|
|
8
7
|
private el;
|
|
9
8
|
private tokenList;
|
|
@@ -649,14 +648,6 @@ interface Instance<T = Record<string, any>> extends Component<T>, Show, PageInst
|
|
|
649
648
|
$nextTick?(cb: () => void): void;
|
|
650
649
|
$options: Instance;
|
|
651
650
|
}
|
|
652
|
-
interface VueAppInstance extends ComponentOptions<VueCtor> {
|
|
653
|
-
$options: AppInstance;
|
|
654
|
-
}
|
|
655
|
-
type VueInstance<M = Record<string, any>, P = Record<string, any>> = CombinedVueInstance<VueCtor, Record<string, any>, M, P, Record<never, any>> & VueInternal;
|
|
656
|
-
interface VueInternal {
|
|
657
|
-
_render(): VNode;
|
|
658
|
-
_update(vnode: VNode, hyrate: boolean): void;
|
|
659
|
-
}
|
|
660
651
|
interface PageProps {
|
|
661
652
|
tid?: string;
|
|
662
653
|
}
|
|
@@ -706,6 +697,8 @@ interface PageInstance extends PageLifeCycle {
|
|
|
706
697
|
options?: Record<string, unknown>;
|
|
707
698
|
/** 页面渲染引擎类型 */
|
|
708
699
|
renderer?: "webview" | "skyline";
|
|
700
|
+
/** 获得一个 EventChannel 对象,用于页面间通讯 */
|
|
701
|
+
getOpenerEventChannel?(): Record<string, any>;
|
|
709
702
|
}
|
|
710
703
|
interface Show {
|
|
711
704
|
componentDidShow?(): void;
|
|
@@ -715,8 +708,8 @@ interface Show {
|
|
|
715
708
|
}
|
|
716
709
|
interface AppInstance extends Show {
|
|
717
710
|
componentDidShow?(options?: Record<string, unknown>): void;
|
|
718
|
-
mount?(component: React.ComponentClass |
|
|
719
|
-
mount?(component: React.ComponentClass |
|
|
711
|
+
mount?(component: React.ComponentClass | Vue3Component, id: string, cb: (...args: any[]) => void): void;
|
|
712
|
+
mount?(component: React.ComponentClass | Vue3Component, id: string, getCtx: (...args: any[]) => void, cb: (...args: any[]) => void): void;
|
|
720
713
|
onError?(error: string): void;
|
|
721
714
|
onLaunch?(options?: Record<string, unknown>): void;
|
|
722
715
|
onPageNotFound?(res: any): void;
|
|
@@ -770,6 +763,14 @@ declare function createRecursiveComponentConfig(componentName?: string): any;
|
|
|
770
763
|
declare function hydrate(node: TaroElement | TaroText): MiniData;
|
|
771
764
|
declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
|
|
772
765
|
declare const options: Options;
|
|
766
|
+
declare class Performance {
|
|
767
|
+
#private;
|
|
768
|
+
private recorder;
|
|
769
|
+
start(id: string): void;
|
|
770
|
+
stop(id: string, now?: number): void;
|
|
771
|
+
delayStop(id: string, delay?: number): ((...args: any[]) => void) | undefined;
|
|
772
|
+
}
|
|
773
|
+
declare const perf: Performance;
|
|
773
774
|
declare const incrementId: () => () => string;
|
|
774
775
|
declare function isElement(node: TaroNode): node is TaroElement;
|
|
775
776
|
declare function isText(node: TaroNode): node is TaroText;
|
|
@@ -790,6 +791,7 @@ declare function extend(ctor: Ctor, methodName: string, options: TFunc | Record<
|
|
|
790
791
|
declare function getComponentsAlias(): any;
|
|
791
792
|
declare function convertNumber2PX(value: number): string;
|
|
792
793
|
declare function throttle(fn: any, threshold?: number, scope?: any): (...args: any[]) => void;
|
|
794
|
+
declare function debounce(fn: any, ms?: number, scope?: any): (...args: any[]) => void;
|
|
793
795
|
// export const removeLeadingSlash = (str = '') => str.replace(/^\.?\//, '')
|
|
794
796
|
// export const removeTrailingSearch = (str = '') => str.replace(/\?[\s\S]*$/, '')
|
|
795
797
|
declare const addLeadingSlash: (url?: string) => string;
|
|
@@ -801,4 +803,4 @@ declare const getHomePage: (path?: string, basename?: string, customRoutes?: Rec
|
|
|
801
803
|
declare const getCurrentPage: (routerMode?: string, basename?: string) => string;
|
|
802
804
|
declare function handlePolyfill(): void;
|
|
803
805
|
export { hooks } from '@tarojs/shared';
|
|
804
|
-
export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, COMPILE_MODE, CATCHMOVE, CATCH_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId, isElement, isText, isComment, isHasExtractProp, isParentBinded, shortcutAttr, customWrapperCache, extend, getComponentsAlias, convertNumber2PX, throttle, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance,
|
|
806
|
+
export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, COMPILE_MODE, CATCHMOVE, CATCH_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, perf, incrementId, isElement, isText, isComment, isHasExtractProp, isParentBinded, shortcutAttr, customWrapperCache, extend, getComponentsAlias, convertNumber2PX, throttle, debounce, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniTextData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$1 as Options, TFunc, PageConfig, handlePolyfill };
|
package/dist/index.cjs.js
CHANGED
|
@@ -219,6 +219,16 @@ function throttle(fn, threshold = 250, scope) {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
+
function debounce(fn, ms = 250, scope) {
|
|
223
|
+
let timer;
|
|
224
|
+
return function (...args) {
|
|
225
|
+
const context = scope || this;
|
|
226
|
+
clearTimeout(timer);
|
|
227
|
+
timer = setTimeout(function () {
|
|
228
|
+
fn.apply(context, args);
|
|
229
|
+
}, ms);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
222
232
|
|
|
223
233
|
const eventCenter = shared.hooks.call('getEventCenter', shared.Events);
|
|
224
234
|
|
|
@@ -1299,6 +1309,7 @@ function hydrate(node) {
|
|
|
1299
1309
|
// 初始化 SPECIAL_NODES
|
|
1300
1310
|
SPECIAL_NODES || (SPECIAL_NODES = shared.hooks.call('getSpecialNodes'));
|
|
1301
1311
|
const nodeName = node.nodeName;
|
|
1312
|
+
let compileModeName = null;
|
|
1302
1313
|
if (isText(node)) {
|
|
1303
1314
|
return {
|
|
1304
1315
|
sid: node.sid,
|
|
@@ -1330,11 +1341,14 @@ function hydrate(node) {
|
|
|
1330
1341
|
propInCamelCase !== COMPILE_MODE) {
|
|
1331
1342
|
data[propInCamelCase] = props[prop];
|
|
1332
1343
|
}
|
|
1333
|
-
if (
|
|
1344
|
+
if (process.env.TARO_ENV !== 'swan' &&
|
|
1345
|
+
nodeName === VIEW &&
|
|
1346
|
+
propInCamelCase === CATCHMOVE &&
|
|
1347
|
+
props[prop] !== false) {
|
|
1334
1348
|
data["nn" /* Shortcuts.NodeName */] = CATCH_VIEW;
|
|
1335
1349
|
}
|
|
1336
1350
|
if (propInCamelCase === COMPILE_MODE) {
|
|
1337
|
-
|
|
1351
|
+
compileModeName = props[prop];
|
|
1338
1352
|
}
|
|
1339
1353
|
}
|
|
1340
1354
|
// Children
|
|
@@ -1358,6 +1372,9 @@ function hydrate(node) {
|
|
|
1358
1372
|
}
|
|
1359
1373
|
}
|
|
1360
1374
|
}
|
|
1375
|
+
if (compileModeName !== null) {
|
|
1376
|
+
data["nn" /* Shortcuts.NodeName */] = compileModeName;
|
|
1377
|
+
}
|
|
1361
1378
|
const resData = shared.hooks.call('transferHydrateData', data, node, componentAlias);
|
|
1362
1379
|
return resData || data;
|
|
1363
1380
|
}
|
|
@@ -1629,7 +1646,7 @@ class TaroNode extends TaroEventTarget {
|
|
|
1629
1646
|
: [],
|
|
1630
1647
|
nextSibling: isReplace
|
|
1631
1648
|
? refChild.nextSibling /** replaceChild */
|
|
1632
|
-
: (refChild || null),
|
|
1649
|
+
: (refChild || null), /** insertBefore & appendChild */
|
|
1633
1650
|
previousSibling: newChild.previousSibling
|
|
1634
1651
|
});
|
|
1635
1652
|
return newChild;
|
|
@@ -2953,7 +2970,7 @@ function makeMap(str, expectsLowerCase) {
|
|
|
2953
2970
|
for (let i = 0; i < list.length; i++) {
|
|
2954
2971
|
map[list[i]] = true;
|
|
2955
2972
|
}
|
|
2956
|
-
return
|
|
2973
|
+
return val => !!map[val.toLowerCase()] ;
|
|
2957
2974
|
}
|
|
2958
2975
|
const specialMiniElements = {
|
|
2959
2976
|
img: 'image',
|
|
@@ -2963,11 +2980,11 @@ const internalCompsList = Object.keys(shared.internalComponents)
|
|
|
2963
2980
|
.map(i => i.toLowerCase())
|
|
2964
2981
|
.join(',');
|
|
2965
2982
|
// https://developers.weixin.qq.com/miniprogram/dev/component
|
|
2966
|
-
const isMiniElements = makeMap(internalCompsList
|
|
2983
|
+
const isMiniElements = makeMap(internalCompsList);
|
|
2967
2984
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
|
|
2968
|
-
const isInlineElements = makeMap('a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b'
|
|
2985
|
+
const isInlineElements = makeMap('a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b');
|
|
2969
2986
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
|
2970
|
-
const isBlockElements = makeMap('address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt'
|
|
2987
|
+
const isBlockElements = makeMap('address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt');
|
|
2971
2988
|
|
|
2972
2989
|
const closingTagAncestorBreakers = {
|
|
2973
2990
|
li: ['ul', 'ol', 'menu'],
|
|
@@ -3264,6 +3281,7 @@ function cloneNode(isDeep = false) {
|
|
|
3264
3281
|
}
|
|
3265
3282
|
for (const key in this) {
|
|
3266
3283
|
const value = this[key];
|
|
3284
|
+
// eslint-disable-next-line valid-typeof
|
|
3267
3285
|
if ([PROPS, DATASET].includes(key) && typeof value === OBJECT) {
|
|
3268
3286
|
newNode[key] = Object.assign({}, value);
|
|
3269
3287
|
}
|
|
@@ -3495,7 +3513,7 @@ class FormElement extends TaroElement {
|
|
|
3495
3513
|
else if (event.type === INPUT) {
|
|
3496
3514
|
// Web 规范中表单组件的 value 应该跟着输入改变
|
|
3497
3515
|
// 只是改 this.props.value 的话不会进行 setData,因此这里修改 this.value。
|
|
3498
|
-
// 只测试了 React、
|
|
3516
|
+
// 只测试了 React、Vue3 input 组件的 onInput 事件,onChange 事件不确定有没有副作用,所以暂不修改。
|
|
3499
3517
|
this.value = val;
|
|
3500
3518
|
}
|
|
3501
3519
|
}
|
|
@@ -3503,8 +3521,10 @@ class FormElement extends TaroElement {
|
|
|
3503
3521
|
}
|
|
3504
3522
|
}
|
|
3505
3523
|
|
|
3524
|
+
var _Performance_instances, _Performance_parseTime;
|
|
3506
3525
|
class Performance {
|
|
3507
3526
|
constructor() {
|
|
3527
|
+
_Performance_instances.add(this);
|
|
3508
3528
|
this.recorder = new Map();
|
|
3509
3529
|
}
|
|
3510
3530
|
start(id) {
|
|
@@ -3513,18 +3533,32 @@ class Performance {
|
|
|
3513
3533
|
}
|
|
3514
3534
|
this.recorder.set(id, Date.now());
|
|
3515
3535
|
}
|
|
3516
|
-
stop(id) {
|
|
3536
|
+
stop(id, now = Date.now()) {
|
|
3517
3537
|
if (!options.debug) {
|
|
3518
3538
|
return;
|
|
3519
3539
|
}
|
|
3520
|
-
const now = Date.now();
|
|
3521
3540
|
const prev = this.recorder.get(id);
|
|
3541
|
+
if (!(prev >= 0))
|
|
3542
|
+
return;
|
|
3522
3543
|
this.recorder.delete(id);
|
|
3523
3544
|
const time = now - prev;
|
|
3524
3545
|
// eslint-disable-next-line no-console
|
|
3525
|
-
console.log(`${id} 时长: ${time}ms`);
|
|
3546
|
+
console.log(`${id} 时长: ${time}ms 开始时间:${tslib.__classPrivateFieldGet(this, _Performance_instances, "m", _Performance_parseTime).call(this, prev)} 结束时间:${tslib.__classPrivateFieldGet(this, _Performance_instances, "m", _Performance_parseTime).call(this, now)}`);
|
|
3547
|
+
}
|
|
3548
|
+
delayStop(id, delay = 500) {
|
|
3549
|
+
if (!options.debug) {
|
|
3550
|
+
return;
|
|
3551
|
+
}
|
|
3552
|
+
return debounce((now = Date.now(), cb) => {
|
|
3553
|
+
this.stop(id, now);
|
|
3554
|
+
cb === null || cb === void 0 ? void 0 : cb();
|
|
3555
|
+
}, delay);
|
|
3526
3556
|
}
|
|
3527
3557
|
}
|
|
3558
|
+
_Performance_instances = new WeakSet(), _Performance_parseTime = function _Performance_parseTime(time) {
|
|
3559
|
+
const d = new Date(time);
|
|
3560
|
+
return `${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}.${`${d.getMilliseconds()}`.padStart(3, '0')}`;
|
|
3561
|
+
};
|
|
3528
3562
|
const perf = new Performance();
|
|
3529
3563
|
|
|
3530
3564
|
function findCustomWrapper(root, dataPathArr) {
|
|
@@ -4069,6 +4103,11 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4069
4103
|
eventCenter.trigger(getOnHideEventKey(id));
|
|
4070
4104
|
}
|
|
4071
4105
|
};
|
|
4106
|
+
if (process.env.TARO_PLATFORM === 'web') {
|
|
4107
|
+
config.getOpenerEventChannel = () => {
|
|
4108
|
+
return shared.EventChannel.pageChannel;
|
|
4109
|
+
};
|
|
4110
|
+
}
|
|
4072
4111
|
LIFECYCLES.forEach((lifecycle) => {
|
|
4073
4112
|
let isDefer = false;
|
|
4074
4113
|
lifecycle = lifecycle.replace(/^defer:/, () => {
|
|
@@ -4763,7 +4802,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4763
4802
|
*/
|
|
4764
4803
|
function addEvent(node, event, fn, opt_useCapture) {
|
|
4765
4804
|
if (shared.isFunction(node.addEventListener)) {
|
|
4766
|
-
node.addEventListener(event, fn, opt_useCapture
|
|
4805
|
+
node.addEventListener(event, fn, opt_useCapture );
|
|
4767
4806
|
}
|
|
4768
4807
|
else if (shared.isFunction(node.attachEvent)) {
|
|
4769
4808
|
node.attachEvent('on' + event, fn);
|
|
@@ -4779,7 +4818,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4779
4818
|
*/
|
|
4780
4819
|
function removeEvent(node, event, fn, opt_useCapture) {
|
|
4781
4820
|
if (shared.isFunction(node.removeEventListener)) {
|
|
4782
|
-
node.removeEventListener(event, fn, opt_useCapture
|
|
4821
|
+
node.removeEventListener(event, fn, opt_useCapture );
|
|
4783
4822
|
}
|
|
4784
4823
|
else if (shared.isFunction(node.detatchEvent)) {
|
|
4785
4824
|
node.detatchEvent('on' + event, fn);
|
|
@@ -5016,11 +5055,11 @@ if (process.env.SUPPORT_TARO_POLYFILL !== 'disabled' && process.env.TARO_PLATFOR
|
|
|
5016
5055
|
handlePolyfill();
|
|
5017
5056
|
}
|
|
5018
5057
|
|
|
5019
|
-
Object.defineProperty(exports,
|
|
5058
|
+
Object.defineProperty(exports, "Events", {
|
|
5020
5059
|
enumerable: true,
|
|
5021
5060
|
get: function () { return shared.Events; }
|
|
5022
5061
|
});
|
|
5023
|
-
Object.defineProperty(exports,
|
|
5062
|
+
Object.defineProperty(exports, "hooks", {
|
|
5024
5063
|
enumerable: true,
|
|
5025
5064
|
get: function () { return shared.hooks; }
|
|
5026
5065
|
});
|
|
@@ -5096,6 +5135,7 @@ exports.createEvent = createEvent;
|
|
|
5096
5135
|
exports.createPageConfig = createPageConfig;
|
|
5097
5136
|
exports.createRecursiveComponentConfig = createRecursiveComponentConfig;
|
|
5098
5137
|
exports.customWrapperCache = customWrapperCache;
|
|
5138
|
+
exports.debounce = debounce;
|
|
5099
5139
|
exports.document = document$1;
|
|
5100
5140
|
exports.env = env;
|
|
5101
5141
|
exports.eventCenter = eventCenter;
|
|
@@ -5128,6 +5168,7 @@ exports.navigator = nav;
|
|
|
5128
5168
|
exports.nextTick = nextTick;
|
|
5129
5169
|
exports.options = options;
|
|
5130
5170
|
exports.parseUrl = parseUrl;
|
|
5171
|
+
exports.perf = perf;
|
|
5131
5172
|
exports.removePageInstance = removePageInstance;
|
|
5132
5173
|
exports.requestAnimationFrame = _raf;
|
|
5133
5174
|
exports.safeExecute = safeExecute;
|