mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: tests
This commit is contained in:
@@ -11,6 +11,16 @@ const timeOrigin = Date.now();
|
||||
const emptyArray = [] as const;
|
||||
|
||||
export class DOMEvent {
|
||||
/**
|
||||
* @private
|
||||
* Internal API to facilitate testing - to be removed once we've completed
|
||||
* the breaking changes to migrate fully to DOMEvents.
|
||||
*
|
||||
* Gets the last event to be dispatched, allowing you to access the DOM
|
||||
* Event that corresponds to the currently-running callback.
|
||||
*/
|
||||
static unstable_currentEvent: DOMEvent | null = null;
|
||||
|
||||
readonly NONE = 0;
|
||||
readonly CAPTURING_PHASE = 1;
|
||||
readonly AT_TARGET = 2;
|
||||
@@ -216,6 +226,10 @@ export class DOMEvent {
|
||||
this.target = target;
|
||||
this._canceled = false;
|
||||
|
||||
// Internal API to facilitate testing - to be removed once we've
|
||||
// completed the breaking changes to migrate fully to DOMEvents.
|
||||
DOMEvent.unstable_currentEvent = this;
|
||||
|
||||
/**
|
||||
* Resets any internal state to allow the event to be redispatched. Call
|
||||
* this before returning.
|
||||
|
||||
1
packages/core/index.d.ts
vendored
1
packages/core/index.d.ts
vendored
@@ -77,6 +77,7 @@ export declare const Connectivity: {
|
||||
};
|
||||
export * from './core-types';
|
||||
export { CSSUtils } from './css/system-classes';
|
||||
export { DOMEvent } from './data/dom-events/dom-event';
|
||||
export { ObservableArray, ChangeType } from './data/observable-array';
|
||||
export type { ChangedData } from './data/observable-array';
|
||||
export { Observable, WrappedValue, fromObject, fromObjectRecursive } from './data/observable';
|
||||
|
||||
@@ -97,6 +97,7 @@ export * from './core-types';
|
||||
|
||||
export { CSSUtils } from './css/system-classes';
|
||||
|
||||
export { DOMEvent } from './data/dom-events/dom-event';
|
||||
export { ObservableArray, ChangeType } from './data/observable-array';
|
||||
export type { ChangedData } from './data/observable-array';
|
||||
export { Observable, WrappedValue, fromObject, fromObjectRecursive } from './data/observable';
|
||||
|
||||
Reference in New Issue
Block a user