javascript - Why does jquery have a function "returnTrue()" and "returnFalse()" that just return true and false? -
according https://github.com/jquery/jquery/blob/9434e03193c45d51bbd063a0edd1a07a6178d33f/src/event.js#l21-l27 there 2 functions in event.js in jquery return true , false: events.js
function returntrue() { return true; } function returnfalse() { return false; }
i know good. don't understand reasoning this.
did , see used?
they used stubs assignments need function returns boolean.
for example on line 670 of same document:
this.isdefaultprevented = returntrue;
isdefaultprevented function. needs function returns true default functionality.
Comments
Post a Comment