Last active
September 25, 2023 09:32
-
-
Save luckydevilru/b256c2b682d843bdc875b107f01bcb89 to your computer and use it in GitHub Desktop.
Логирования js событий bitrix bitrix24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let originalBxOnCustomEvent = BX.onCustomEvent; | |
BX.onCustomEvent = function (eventObject, eventName, eventParams, secureParams) | |
{ | |
let realEventName = BX.type.isString(eventName) ? | |
eventName : BX.type.isString(eventObject) ? eventObject : null; | |
let i = 0; | |
console.log('realEventName', realEventName); | |
console.log( | |
"%c" + realEventName + " - " + new Date().toLocaleTimeString(), | |
"font-weight: bold; padding: 3px 4px;" | |
); | |
console.log( | |
"eventParams", | |
eventParams | |
); | |
console.dir({ | |
eventObject: eventObject, | |
eventParams: eventParams, | |
secureParams: secureParams | |
}); | |
originalBxOnCustomEvent.apply( | |
null, arguments | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment