| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
We've already had `buildFragment` extracted to a separate file long ago.
`domManip` is quite a complex & crucial API and so far it has existed within
the `manipulation.js` module. Extracting it makes the module shorter and easier
to understand.
A few comments / messages in tests have also been updated to not suggest there's
a public `jQuery.domManip` API - it's been private since 3.0.0.
Closes gh-5138
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuery
manipulation methods in a way that doesn't violate the
`require-trusted-types-for` Content Security Policy directive.
This commit builds on previous work needed for trusted types support, including
gh-4642 and gh-4724.
One restriction is that while any TrustedHTML wrapper should work as input
for jQuery methods like `.html()` or `.append()`, for passing directly to the
`jQuery` factory the string must start with `<` and end with `>`; no trailing
or leading whitespaces are allowed. This is necessary as we cannot parse out
a part of the input for further construction; that would violate the CSP rule -
and that's what's done to HTML input not matching these constraints.
No trusted types API is used explicitly in source; the majority of the work is
ensuring we don't pass the input converted to string to APIs that would
eventually assign it to `innerHTML`. This extra cautiousness is caused by the
API being Blink-only, at least for now.
The ban on passing strings to `innerHTML` means support tests relying on such
assignments are impossible. We don't currently have such tests on the `main`
branch but we used to have many of them in the 3.x & older lines. If there's
a need to re-add such a test, we'll need an escape hatch to skip them for apps
needing CSP-enforced TrustedHTML.
See https://web.dev/trusted-types/ for more information about TrustedHTML.
Fixes gh-4409
Closes gh-4927
Ref gh-4642
Ref gh-4724
|
|
|
|
|
|
| |
Fixes gh-4542
Closes gh-4563
Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Concatenating HTML strings in buildFragment is a possible security risk as it
creates an opportunity of escaping the concatenated wrapper. It also makes it
impossible to support secure HTML wrappers like
[trusted types](https://web.dev/trusted-types/). It's safer to create wrapper
elements using `document.createElement` & `appendChild`.
The previous way was needed in jQuery <4 because IE <10 doesn't accept table
parts set via `innerHTML`, even if the element which contents are set is
a proper table element, e.g.:
```js
tr.innerHTML = "<td></td>";
```
The whole structure needs to be passed in one HTML string. jQuery 4 drops
support for IE <11 so this is no longer an issue; in older version we'd have
to duplicate the code paths.
IE <10 needed to have `<option>` elements wrapped in
`<select multiple="multiple">` but we no longer need that on master which
makes the `document.createElement` way shorter as we don't have to call
`setAttribute`.
All these improvements, apart from making logic more secure, decrease the
gzipped size by 58 bytes.
Closes gh-4724
Ref gh-4409
Ref angular/angular.js#17028
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
|
|
|
|
|
|
|
| |
To achieve that, use `eslint-plugin-import`'s `no-unused-modules` rule.
Also, explicitly import `event/trigger.js` from `jquery.js`; so far it was
only imported from ajax.js, making it mistakenly skipped in the
`custom:slim,-deprecated` build.
|
|
|
|
|
|
|
|
|
|
| |
1. Support passing custom document to jQuery.globalEval; the script will be
invoked in the context of this document.
2. Fire external scripts appended to iframe contents in that iframe context;
this was already supported & tested for inline scripts but not for external
ones.
Fixes gh-4518
Closes gh-4601
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate all source AMD modules to ECMAScript modules. The final bundle
is compiled by a custom build process that uses Rollup under the hood.
Test files themselves are still loaded via RequireJS as that has to work in
IE 11.
Tests can now be run in "Load as modules" mode which replaces the previous
"Load with AMD" option. That option of running tests doesn't work in IE
and Edge as it requires support for dynamic imports.
Some of the changes required by the migration:
* check `typeof` of `noGlobal` instead of using the variable directly
as it's not available when modules are used
* change the nonce module to be an object as ECMASscript module exports
are immutable
* remove some unused exports
* import `./core/parseHTML.js` directly in `jquery.js` so that it's not
being cut out when the `ajax` module is excluded in a custom compilation
Closes gh-4541
|
|
|
|
|
|
|
| |
Also, update some tests to IE-sniff when deciding whether
to skip a test.
Fixes gh-4386
Closes gh-4387
|
|
|
|
|
|
|
|
|
|
|
| |
Also, update support comments format to match format described in:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
with the change from:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379
(open-ended ranges end with `+`).
Fixes gh-3950
Fixes gh-4299
Closes gh-4347
|
|
|
|
|
| |
Fixes gh-4323
Closes gh-4328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary of the changes/fixes:
1. Trigger checkbox and radio click events identically (cherry-picked from
b442abacbb8464f0165059e8da734e3143d0721f that was reverted before).
2. Manually trigger a native event before checkbox/radio handlers.
3. Add test coverage for triggering namespaced native-backed events.
4. Propagate extra parameters passed when triggering the click event to
the handlers.
5. Intercept and preserve namespaced native-backed events.
6. Leverage native events for focus and blur.
7. Accept that focusin handlers may fire more than once for now.
Fixes gh-1741
Fixes gh-3423
Fixes gh-3751
Fixes gh-4139
Closes gh-4279
Ref gh-1367
Ref gh-3494
|
|
|
|
|
|
| |
IE and iOS <10 XHR transport does not succeed on data: URIs
Ref gh-4243
Ref gh-4126
Closes gh-4258
|
|
|
|
|
| |
Fixes gh-4126
Closes gh-4243
|
|
|
|
|
|
|
| |
Allow `isAttached` to check Shadow DOM for attachment.
Fixes gh-3504
Closes gh-3996
Ref gh-3977
|
|
|
|
| |
Fixes gh-4124
Closes gh-4125
|
|
|
|
|
|
|
| |
This change replaces the use of contains to check for attachment
by isAttached function
Closes gh-3977
Ref gh-3504
|
|
|
|
|
| |
Fixes gh-3871
Close gh-3869
|
|
|
|
|
| |
Fixes gh-3605
Close gh-3895
|
|
|
|
| |
This reverts commit b442abacbb8464f0165059e8da734e3143d0721f.
|
|
|
|
|
| |
Fixes gh-3475
Closes gh-3505
|
|
|
|
|
| |
Fixes gh-3423
Closes gh-3494
|
| |
|
|
|
|
| |
Fixes gh-3073
|
|
|
|
|
| |
The changes follow the spec proposed in:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
|
|
|
|
|
|
|
|
|
|
| |
Support comments that were lacking the final IE/Edge version that exhibits
the bug were checked & updated. Links to the Chromium bug tracker were updated.
Code in tests related to unsupported browsers (like Android 2.3 in non-basic
tests) has been removed.
Fixes gh-2868
Closes gh-2949
|
|
|
|
|
| |
Fixes gh-2005
Closes gh-2634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we can reply on parsers that were designed to cope with
malformed syntax to understand what we mean, we shouldn't
intentionally provide bad markup, not all parsers will accept
it.
"Be conservative in what you do, be liberal in what you accept
from others."
Reverts 0ea342a6a6dce793c1b0f14f051c2573f40f4e44
Refs gh-2031
Refs gh-2002
Fixes gh-2493
Closes gh-2499
|
|
|
|
|
|
|
|
| |
Drop non-critical workarounds for Android 2.3.
Fixes gh-2483
Fixes gh-2505
Closes gh-2581
|
|
|
|
| |
Fixes gh-2056
|
|
|
|
| |
Fixes gh-2224
|
|
|
|
|
|
|
| |
* Remove "async = true" from script transport since it was needed
for FF < 4 and old Opera which we do not support anymore
* Add comment to "evalUrl" method on why "type" field should be explicit
|
|
|
|
|
| |
Fixes gh-1950
Closes gh-1949
|
|
|
|
|
| |
Fixes gh-1887
Closes gh-1888
|
|
|
|
|
| |
Refs gh-1820
Closes gh-1841
|
|
|
|
|
|
|
|
| |
That includes Opera 12.x, Firefox<29, Safari<6.0 and some hacks
for old Blackberry.
Closes gh-1820
Refs gh-1815
|
|
|
|
| |
Closes gh-1577
|
|
|
|
|
|
|
|
| |
Setting the innerHTML property in an unsafe manner raises issues in
Windows Web Applications. Strings being passed into innerHTML cannot
include the name attribute.
Closes gh-1537
|
|
|
|
|
|
|
|
|
|
| |
IE11 fixed the checkbox defaultValue issue but not textarea. Rather than
creating a new detect name I'm reusing the old one to protect anyone who
is unwisely using this externally. Re-fixing the defaultValue when it
doesn't need to be done is not a problem, so leave that code for IE11.
Fixes #14716
Closes gh-1495
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
prettier builds). No functionality changes.
|
| |
|
| |
|
| |
|
|
|