| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The HTML spec defines boolean attributes:
https://html.spec.whatwg.org/#boolean-attributes
that often correlate with boolean properties. If the attribute is missing, it
correlates with the `false` property value, if it's present - the `true`
property value. The only valid values are an empty string or the attribute name.
jQuery tried to be helpful here and treated boolean attributes in a special way
in the `.attr()` API:
1. For the getter, as long as the attribute was present, it was returning the
attribute name lowercased, ignoring the value.
2. For the setter, it was removing the attribute when `false` was passed;
otherwise, it was ignoring the passed value and set the attribute -
interestingly, in jQuery `>=3` not lowercased anymore.
The problem is the spec occasionally converts boolean attributes into ones with
additional attribute values with special behavior - one such example is the new
`"until-found"` value for the `hidden` attribute. Our setter normalization
means passing those values is impossible with jQuery. Also, new boolean
attributes are introduced occasionally and jQuery cannot easily add them to the
list without incurring breaking changes.
This patch removes any special handling of boolean attributes - the getter
returns the value as-is and the setter sets the provided value.
To provide better backwards compatibility with the very frequent `false` value
provided to remove the attribute, this patch makes `false` trigger attribute
removal for ALL non-ARIA attributes. ARIA attributes are exempt from the rule
since many of them recognize `"false"` as a valid value with semantics different
than the attribute missing. To remove an ARIA attribute, use `.removeAttr()` or
pass `null` as the value to `.attr()` which doesn't have this exception.
Fixes gh-5388
Closes gh-5452
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated tasks include:
- lint
- npmcopy
- build, minify, and process for distribution.
- new custom build command using yargs
- compare size of minified/gzip built files
- pretest scripts, including qunit-fixture, babel transpilation, and npmcopy
- node smoke tests
- promises aplus tests
- new watch task using `rollup.watch` directly
Also:
- upgraded husky and added the new lint command
- updated lint config to use new "flat" config format. See https://eslint.org/docs/latest/use/configure/configuration-files-new
- Temporarily disabled one lint rule until flat config is supported by eslint-plugin-import. See https://github.com/import-js/eslint-plugin-import/issues/2556
- committed package-lock.json
- updated all test scripts to use the new build
- added an express test server that uses middleware-mockserver (this can be used to run tests without karma)
- build-all-variants is now build:all
Close gh-5318
|
|
|
|
|
|
|
|
|
|
| |
Introduces a new test API, `includesModule`. The method returns whether
a particular module like "ajax" or "deprecated" is included in the current
jQuery build; it handles the slim build as well. The util was created so that
we don't treat presence of particular APIs to decide whether to run a test as
then if we accidentally remove an API, the tests would still not fail.
Fixes gh-5069
Closes gh-5046
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes jQuery skip falsy values in `addClass( array )`
& `removeClass( array )` instead of stopping iteration when the first falsy
value is detected. This makes code like:
```js
elem.addClass( [ "a", "", "b" ] );
```
add both the `a` & `b` classes.
The code was also optimized for size a bit so it doesn't increase the
minified gzipped size.
Fixes gh-4998
Closes gh-5003
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GitHub UI treats `#NUMBER` as referring to its own issues which is confusing
when in jQuery source it's usually referring to the old deprecated Trac instance
at https://bugs.jquery.com. This change replaces all such Trac references with
`trac-NUMBER`.
A few of the references came with the Sizzle integration and referred to the
Sizzle GitHub bug tracker. Those have been replaced with full links instead.
A new entry describing issue reference conventions has been added to README.
Closes gh-4993
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stringifying attributes in the setter was needed for IE <=9 but it breaks
trusted types enforcement when setting a script `src` attribute.
Note that this doesn't mean script execution works. Since jQuery disables all
scripts by changing their type and then executes them by creating fresh script
tags with proper `src` & possibly other attributes, this unwraps any trusted
`src` wrappers, making the script not execute under strict CSP settings.
We might try to fix it in the future in a separate change.
Fixes gh-4948
Closes gh-4949
|
|
|
|
|
|
|
| |
The behavior of this signature is not intuitive, especially if classes are
manipulated via other ways between `toggleClass` calls.
Fixes gh-3388
Closes gh-4766
|
|
|
| |
Closes gh-4642
|
|
|
|
|
|
|
|
|
|
| |
Before this change, `val()` was stripping out carriage return characters from
the returned value. No test has relied on that. The logic was different for
option elements as its custom defined hook was omitting this stripping logic.
This commit gets rid of the carriage return removal and isolates the IE-only
select val getter to be skipped in other browsers.
Closes gh-4585
|
|
|
|
|
| |
The tests relied on `jQuery.cache` so they only ever worked in jQuery 1.x.
Closes gh-4586
|
|
|
|
|
|
|
|
|
|
| |
qSA in IE 11/Edge often (but not always) don't find elements with an empty
name attribute selector (`[name=""]`). Detect that & fall back to Sizzle
traversal.
Interestingly, IE 10 & older don't seem to have the issue.
Fixes gh-4435
Closes gh-4510
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes Sizzle from jQuery, inlining its code & removing obsolete
workarounds where applicable.
The selector-native module has been removed. Further work on the selector
module may decrease the size enough that it will no longer be necessary. If
it turns out it's still useful, we'll reinstate it but the code will look
different anyway as we'll want to share as much code as possible with
the existing selector module.
The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are
sorted by their first contributions to either of the two repositories.
The commit reduces the gzipped jQuery size by 1460 bytes compared to master.
Closes gh-4395
|
|
|
|
|
|
|
| |
Apart from porting most Sizzle tests to jQuery (mostly to its selector module),
this commit fixes selector-native so that a jQuery custom compilation that
excludes Sizzle passes all tests as well.
Closes gh-4406
|
|
|
|
|
|
|
| |
Also, update some tests to IE-sniff when deciding whether
to skip a test.
Fixes gh-4386
Closes gh-4387
|
|
|
|
|
|
|
|
| |
Also, run `grunt npmcopy` to sync the "external" directory with dependencies
from package.json. For example, the Sinon library version didn't match.
Ref gh-4234
Closes gh-4297
|
|
|
|
|
| |
Fixes gh-3867
Close gh-3931
|
|
|
|
|
|
|
|
|
| |
+30 bytes instead of +182
Thanks to @faisaliyk for the first pass on this feature.
Fixes gh-3532
Close gh-3917
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update QUnit to 1.23.1
- Remove unused dl#dl from test/index.html
- Remove unused map#imgmap from test/index.html
- Ensure all urls to data use baseURI
- Add the 'grunt karma:main' task
- customContextFile & customDebugFile
- Add 'npm run jenkins' script
Close gh-3744
Fixes gh-1999
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Renames and changes rnotwhite to focus on HTML whitespace chars
- Change internal use of jQuery.trim to more accurate strip and collapse
- Adds tests to ensure HTML space characters are retained where valid
- Doesn't add tests where the difference is inconsequential and
existing tests are adequate.
Fixes gh-3003
Fixes gh-3072
Close gh-3316
|
|
|
|
|
|
| |
Use eslint pragmas, fix new errors, etc
Closes gh-3148
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attribute hooks are determined for the lowercase versions of attribute names
but this has not been reflected in the bool attribute hooks. The code that
temporarily removed a handler to avoid an infinite loop was removing an
incorrect handler causing stack overflow.
Fixes gh-3133
Refs gh-2914
Refs gh-2916
Closes gh-3134
|
|
|
|
|
|
| |
One test in the attribute module was overwriting jQuery.expr.attrHandle.checked
and wasn't restoring the original state after it finished. It started causing
issues for another checked-related test.
|
|
|
|
|
| |
Fixes gh-2978
Close gh-3002
|
|
|
|
|
| |
Ref gh-2880
Close gh-2921
|
|
|
|
| |
Closes gh-2927
|
|
|
|
|
| |
Fixes gh-2732
Close gh-2840
|
|
|
|
|
|
| |
This reverts commit 53f798cf4d783bb813b4d1ba97411bc752b275f3.
- Turns out this is documented, even if not fully. Need to deprecate before removal.
|
|
|
|
|
| |
Fixes gh-2730
Close gh-2749
|
|
|
|
|
| |
Fixes gh-2562
Close gh-2689
|
|
|
|
|
| |
- The change is already covered by the "checked" test.
Since this test is redundant, just drop it.
|
|
|
|
|
| |
Ref 67d7a2eefee768b59eb3d51cb1fb2c671873e58a
Ref c752a5030bc00eb5b45dea9c28963f824a5c4f44
|
|
|
|
| |
Fixes gh-1759
|
|
|
|
|
| |
Fixes gh-2647
Closes gh-2664
|
|
|
|
| |
Ref gh-2491
|
|
|
|
|
| |
Fixes gh-2491
Close gh-2618
|
|
|
|
|
|
|
|
| |
* Remove QUnit jshint globals
* Extend QUnit.assert methods
* Use assert.async instead of start/stop/done
Ref b930d14ce64937e9478405eee2828d4da091d2cb
|
|
|
|
| |
Fixes gh-2056
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://qunitjs.com/upgrade-guide-2.x/
For most of the boring work was used
https://github.com/apsdehal/qunit-migrate package
However, it can't update local qunit helpers, plus in some places
old QUnit.asyncTest signature is still used
Fixes gh-2540
|
|
|
|
| |
Closes gh-2507
|
|
|
|
|
|
|
|
|
| |
- Note: support for SVG is limited in jQuery,
but this is one area where the cost vs benefit ratio
was acceptable.
Fixes gh-2199
Close gh-2268
|
|
|
|
| |
Ref https://github.com/jquery/jquery/issues/2118
|
| |
|
| |
|
|
|
|
|
| |
Fixes gh-2118
Close gh-2129
|
|
|
|
|
|
|
|
|
| |
The hook is still defined; not using it could cause issues in IE<11.
Also, IE10 no longer throws when value not set but it still doesn't trim the
value. IE11 has all those issues fixed; support comments are updated.
Fixes gh-1902
Closes gh-1901
|
|
|
|
|
|
| |
More to come later.
(cherry picked from commit f6f8848fbe477fa93fd27ac7f10885dd6e97f633)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixes #14858
Ref #14686
Closes gh-1531
(cherry picked from commit 9ec429cf6270e455aba4eba85f4db80e633806b6)
Conflicts:
src/attributes/val.js
|
| |
|
| |
|