You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jgeXml unconditionally overwrites String.prototype.replaceAll with its own version, which does not handle a Function as its second argument according to the spec:
Note that jgexml is not used or called, simply required. This is surprising and was frustrating to track down.
Could you consider not modifying String.prototype.replaceAll (or any global variables or their properties) or, if you must, only polyfilling it when absent and using a spec-conformant polyfill?
Thanks for considering,
Kevin
The text was updated successfully, but these errors were encountered:
jgeXml unconditionally overwrites
String.prototype.replaceAll
with its own version, which does not handle aFunction
as its second argument according to the spec:jgeXml/common.js
Lines 3 to 9 in 82cb8c7
This can break other code in the same project in interesting ways. For example, running the code
prints
Note that
jgexml
is not used or called, simply required. This is surprising and was frustrating to track down.Could you consider not modifying
String.prototype.replaceAll
(or any global variables or their properties) or, if you must, only polyfilling it when absent and using a spec-conformant polyfill?Thanks for considering,
Kevin
The text was updated successfully, but these errors were encountered: