@datadog/browser-core
Advanced tools
Comparing version 5.30.1 to 5.31.1
@@ -11,3 +11,3 @@ "use strict"; | ||
var publicApi = (0, polyfills_1.assign)({ | ||
version: "5.30.1", | ||
version: "5.31.1", | ||
// This API method is intentionally not monitored, since the only thing executed is the | ||
@@ -14,0 +14,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and |
@@ -44,6 +44,8 @@ "use strict"; | ||
var options = passive ? { capture: capture, passive: passive } : capture; | ||
var add = (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)(eventTarget, 'addEventListener'); | ||
// Use the window.EventTarget.prototype when possible to avoid wrong overrides (e.g: https://github.com/salesforce/lwc/issues/1824) | ||
var listenerTarget = window.EventTarget && eventTarget instanceof EventTarget ? window.EventTarget.prototype : eventTarget; | ||
var add = (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)(listenerTarget, 'addEventListener'); | ||
eventNames.forEach(function (eventName) { return add.call(eventTarget, eventName, listenerWithMonitor, options); }); | ||
function stop() { | ||
var remove = (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)(eventTarget, 'removeEventListener'); | ||
var remove = (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)(listenerTarget, 'removeEventListener'); | ||
eventNames.forEach(function (eventName) { return remove.call(eventTarget, eventName, listenerWithMonitor, options); }); | ||
@@ -50,0 +52,0 @@ } |
@@ -59,3 +59,3 @@ "use strict"; | ||
var retry = _b.retry, encoding = _b.encoding; | ||
var tags = ["sdk_version:".concat("5.30.1"), "api:".concat(api)].concat(configurationTags); | ||
var tags = ["sdk_version:".concat("5.31.1"), "api:".concat(api)].concat(configurationTags); | ||
if (retry) { | ||
@@ -68,3 +68,3 @@ tags.push("retry_count:".concat(retry.count), "retry_after:".concat(retry.lastFailureStatus)); | ||
"dd-api-key=".concat(clientToken), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.30.1")), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.31.1")), | ||
'dd-evp-origin=browser', | ||
@@ -71,0 +71,0 @@ "dd-request-id=".concat((0, stringUtils_1.generateUUID)()), |
@@ -74,3 +74,3 @@ "use strict"; | ||
service: telemetryService, | ||
version: "5.30.1", | ||
version: "5.31.1", | ||
source: 'browser', | ||
@@ -77,0 +77,0 @@ _dd: { |
@@ -7,3 +7,3 @@ import { catchUserErrors } from '../tools/catchUserErrors'; | ||
var publicApi = assign({ | ||
version: "5.30.1", | ||
version: "5.31.1", | ||
// This API method is intentionally not monitored, since the only thing executed is the | ||
@@ -10,0 +10,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and |
@@ -40,6 +40,8 @@ import { monitor } from '../tools/monitor'; | ||
var options = passive ? { capture: capture, passive: passive } : capture; | ||
var add = getZoneJsOriginalValue(eventTarget, 'addEventListener'); | ||
// Use the window.EventTarget.prototype when possible to avoid wrong overrides (e.g: https://github.com/salesforce/lwc/issues/1824) | ||
var listenerTarget = window.EventTarget && eventTarget instanceof EventTarget ? window.EventTarget.prototype : eventTarget; | ||
var add = getZoneJsOriginalValue(listenerTarget, 'addEventListener'); | ||
eventNames.forEach(function (eventName) { return add.call(eventTarget, eventName, listenerWithMonitor, options); }); | ||
function stop() { | ||
var remove = getZoneJsOriginalValue(eventTarget, 'removeEventListener'); | ||
var remove = getZoneJsOriginalValue(listenerTarget, 'removeEventListener'); | ||
eventNames.forEach(function (eventName) { return remove.call(eventTarget, eventName, listenerWithMonitor, options); }); | ||
@@ -46,0 +48,0 @@ } |
@@ -56,3 +56,3 @@ import { timeStampNow } from '../../tools/utils/timeUtils'; | ||
var retry = _b.retry, encoding = _b.encoding; | ||
var tags = ["sdk_version:".concat("5.30.1"), "api:".concat(api)].concat(configurationTags); | ||
var tags = ["sdk_version:".concat("5.31.1"), "api:".concat(api)].concat(configurationTags); | ||
if (retry) { | ||
@@ -65,3 +65,3 @@ tags.push("retry_count:".concat(retry.count), "retry_after:".concat(retry.lastFailureStatus)); | ||
"dd-api-key=".concat(clientToken), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.30.1")), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.31.1")), | ||
'dd-evp-origin=browser', | ||
@@ -68,0 +68,0 @@ "dd-request-id=".concat(generateUUID()), |
@@ -61,3 +61,3 @@ import { ConsoleApiName } from '../../tools/display'; | ||
service: telemetryService, | ||
version: "5.30.1", | ||
version: "5.31.1", | ||
source: 'browser', | ||
@@ -64,0 +64,0 @@ _dd: { |
{ | ||
"name": "@datadog/browser-core", | ||
"version": "5.30.1", | ||
"version": "5.31.1", | ||
"license": "Apache-2.0", | ||
@@ -26,3 +26,3 @@ "main": "cjs/index.js", | ||
}, | ||
"gitHead": "639b5a7c3830242460e43b97497f2aa41cc9246f" | ||
"gitHead": "aa852195227ff9e7a8e7e4763803b65c43d5a73f" | ||
} |
@@ -130,7 +130,11 @@ import { monitor } from '../tools/monitor' | ||
const add = getZoneJsOriginalValue(eventTarget, 'addEventListener') | ||
// Use the window.EventTarget.prototype when possible to avoid wrong overrides (e.g: https://github.com/salesforce/lwc/issues/1824) | ||
const listenerTarget = | ||
window.EventTarget && eventTarget instanceof EventTarget ? window.EventTarget.prototype : eventTarget | ||
const add = getZoneJsOriginalValue(listenerTarget, 'addEventListener') | ||
eventNames.forEach((eventName) => add.call(eventTarget, eventName, listenerWithMonitor, options)) | ||
function stop() { | ||
const remove = getZoneJsOriginalValue(eventTarget, 'removeEventListener') | ||
const remove = getZoneJsOriginalValue(listenerTarget, 'removeEventListener') | ||
eventNames.forEach((eventName) => remove.call(eventTarget, eventName, listenerWithMonitor, options)) | ||
@@ -137,0 +141,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1144790
20652