aboutsummaryrefslogtreecommitdiffstats
path: root/.npmignore
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2024-01-31 01:47:11 +0100
committerGitHub <noreply@github.com>2024-01-31 01:47:11 +0100
commitb40a4807b604efbde51faf075d11e25441af1990 (patch)
tree57876025e967836f176fdc3462981b19a2111540 /.npmignore
parent805cdb43fd02c3a5783c06b5ec2c9519be0682ab (diff)
downloadjquery-b40a4807b604efbde51faf075d11e25441af1990.tar.gz
jquery-b40a4807b604efbde51faf075d11e25441af1990.zip
Attributes: Shave off a couple of bytes
The `attrHooks` entries for boolean attributes are only defined for jQuery 4+; jQuery 3.x used a separate mechanism - assigning them to `jQuery.expr.attrHandle`. That object used to be maintained by Sizzle, since jQuery 3.7.0 it's kept in the selector module. Because of that, the `isXMLDoc` check used to be require in this hook. Now that standard `attrHooks` are used, the `isXMLDoc` check already happens inside of `jQuery.attr` and there's no need to repeat it in the test. Note that this repetition is even incorrect - while Sizzle's `jQuery.find.attr` used to treat an `undefined` output of the hooks from `jQuery.expr.attrHandle` as a way to opt out of the hook, jQuery's `attrHooks` use `null` to opt out of a getter hook. Apart from the size, this patch also avoids unnecessary extra checks. Closes gh-5398
Diffstat (limited to '.npmignore')
0 files changed, 0 insertions, 0 deletions