From 9c3401699af916bd1efb499c6ee13dabf69c0f7f Mon Sep 17 00:00:00 2001 From: Kiera Ada <1320156+kierrrrra@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:51:34 +0100 Subject: [PATCH] Updating the docs (#86) --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97cf3b5..02fc5a5 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,9 @@ export type CancellationError = { // time since timeOrigin that cancellation occurred end: number; + // the difference between start and end + duration: number; + // reason for cancellation cancellationReason: CancellationReason; @@ -274,6 +277,9 @@ export enum CancellationReason { // user interaction occurred USER_INTERACTION = 'USER_INTERACTION', + // measurement was cancelled because a new one was started + NEW_MEASUREMENT = 'NEW_MEASUREMENT', + // manual cancellation via API happened MANUAL_CANCELLATION = 'MANUAL_CANCELLATION', } @@ -339,7 +345,7 @@ Abort the current TTVC measurement. This method is provided as an escape hatch. Consider using `cancel` to notify @dropbox/ttvc that a user interaction has occurred and continuing the measurement may produce an invalid result. -An optional argument can be passed specifying the type of event that triggered the cancellation. This will be logged to the error callback, and so is used only for diagnostics. +An optional argument can be passed specifying the event that triggered the cancellation. Type of that event will be logged along with the cancellation to the error callback. #### `incrementAjaxCount() & decrementAjaxCount()`