10-08-2020 03:13 PM
We have an application built on the same lines as non-gadget finesse application using jabberwerx.js which is part of Cisco CAXL library released as part of CUP (CAXL version: v2014.04) and noticed that jabberwerx.js has following as part of its code:
function toIntegersAtLease(n) // Format integers to have at least two digits. { return n < 10 ? '0' + n : n; } Date.prototype.toJSON = function(date) // Yes, it polutes the Date namespace, but we'll allow it here, as // it's damned usefull. { return this.getUTCFullYear() + '-' + toIntegersAtLease(this.getUTCMonth()) + '-' + toIntegersAtLease(this.getUTCDate()); };
Now this code not just pollutes the Date namespace but is actually overriding the standard toJSON() implementation and inturn breaks lot javascript frameworks that rely on the standard definition.
Now, the questions really are:
A prompt response on this will be much appreciated as this has an important business case which is being discussed in parallel via a separate SR.
PS - The code snippet included in this discussion is not sensitive/confidential information as this is published by cisco as part of debug version of CAXL release [Reference Link: CAXL Downloads].
Solved! Go to Solution.
10-15-2020 11:19 AM
You can safely comment out that snippet of code. It's actually part of jQuery, which is included in the jabberwerx.js file. As far as I can tell, it's never actually used in the Jabber IM Web SDK.
10-15-2020 11:19 AM
You can safely comment out that snippet of code. It's actually part of jQuery, which is included in the jabberwerx.js file. As far as I can tell, it's never actually used in the Jabber IM Web SDK.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide