#javascriptrel — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #javascriptrel, aggregated by home.social.
-
What's wrong with this JavaScript this in callback?
What's wrong with this JavaScript this in a callback losing context. The JavaScript code passes a method as callback and this becomes undefined. In JavaScript event handlers the method loses its instance.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptrel...
-
Why does this JavaScript Array from object returning wrong?
Why does this JavaScript Array from object returning wrong length. The JavaScript code creates array from array-like using length. In JavaScript a malicious length can allocate huge or wrong size.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptrel...
-
What's wrong with this JavaScript Map for object keys?
What's wrong with this JavaScript Map for object keys with reference equality. The JavaScript code uses objects as Map keys. In JavaScript key lookup uses reference so same-shaped objects do not match.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptrel...
-
Why does this JavaScript indexOf with NaN always returns -1?
Why does this JavaScript indexOf with NaN always returns -1. The JavaScript code uses indexOf to find a calculation result. In JavaScript indexOf uses strict equality and NaN never equals itself.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptrel...
-
Why does this JavaScript Promise.all lose writes?
Why does this JavaScript Promise.all lose writes in a fan out job. The JavaScript code allows one rejection to cancel all other promises. In JavaScript pipelines this causes partial writes and missing data.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptrel...