From f86fa0b2418d2b27395c1fde0b32d97afdce2a28 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Wed, 13 Nov 2024 03:15:14 +0900 Subject: [PATCH] Minor fixes --- modules/CountlyClass.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/CountlyClass.js b/modules/CountlyClass.js index 693f256..f121dde 100644 --- a/modules/CountlyClass.js +++ b/modules/CountlyClass.js @@ -518,7 +518,7 @@ constructor(ob) { notifyLoaders(); - setTimeout(function () { + setTimeout(() => { if (!Countly.noHeartBeat) { heartBeat(); } else { @@ -801,13 +801,17 @@ constructor(ob) { /** * Remove consent for specific feature, meaning, user opted out to track that data (either core feature of from custom feature group) * @param {string|array} feature - name of the feature, possible values, "sessions","events","views","scrolls","clicks","forms","crashes","attribution","users", etc or custom provided through {@link Countly.group_features} - * @param {Boolean} enforceConsentUpdate - regulates if a request will be sent to the server or not. If true, removing consents will send a request to the server and if false, consents will be removed without a request */ this.remove_consent = function (feature) { log(logLevelEnums.INFO, "remove_consent, Removing consent for [" + feature + "]"); this.remove_consent_internal(feature, true); }; - // removes consent without updating + + /** + * Remove consent for specific feature, meaning, user opted out to track that data (either core feature of from custom feature group) + * @param {string|array} feature - name of the feature, possible values, "sessions","events","views","scrolls","clicks","forms","crashes","attribution","users", etc or custom provided through {@link Countly.group_features} + * @param {Boolean} enforceConsentUpdate - regulates if a request will be sent to the server or not. If true, removing consents will send a request to the server and if false, consents will be removed without a request + */ this.remove_consent_internal = function (feature, enforceConsentUpdate) { // if true updateConsent will execute when possible enforceConsentUpdate = enforceConsentUpdate || false; @@ -1540,7 +1544,7 @@ constructor(ob) { /** * Automatically track javascript errors that happen on the website and report them to the server - * @param {string=} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc. + * @param {Object} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc. * */ this.track_errors = function (segments) { if (!isBrowser) { @@ -1608,7 +1612,7 @@ constructor(ob) { /** * Log an exception that you caught through try and catch block and handled yourself and just want to report it to server * @param {Object} err - error exception object provided in catch block - * @param {string=} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc. + * @param {Object} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc. * */ this.log_error = function (err, segments) { log(logLevelEnums.INFO, "log_error, Logging errors");