| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The `default` export is treated differently across tooling when transpiled
to CommonJS - tools differ on whether `module.exports` represents the full
module object or just its default export. Switch `src/` modules to named
exports for tooling consistency.
Fixes gh-5262
Closes gh-5292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AJAX script transport has two versions: XHR + `jQuery.globalEval` or
appending a script tag (note that `jQuery.globalEval` also appends a
script tag now, but inline). The former cannot support the `headers`
option which has so far not been taken into account.
For jQuery 3.x, the main consequence was the option not being respected
for cross-domain requests. Since in 4.x we use the latter way more
often, the option was being ignored in more cases.
The transport now checks whether the `headers` option is specified and
uses the XHR way unless `scriptAttrs` are specified as well.
Fixes gh-5142
Closes gh-5193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR gh-2588 made jQuery stop auto-execute cross-domain scripts unless
`dataType: "script"` was explicitly provided; this change landed in jQuery
3.0.0. This change extends that logic same-domain scripts as well.
After this change, to request a script under a provided URL to be evaluated,
you need to provide `dataType: "script` in `jQuery.ajax` options or to use
`jQuery.getScript`.
Fixes gh-4822
Closes gh-4825
Ref gh-2432
Ref gh-2588
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use a script tag for JSONP requests unless for cross-domain requests
or if scriptAttrs are provided. This makes the `responseJSON` property available
in JSONP error callbacks.
This fixes a regression from jQuery 3.5.0 introduced in gh-4379 which made
erroneous script responses to not be executed to follow native behavior.
The 3.x-stable branch doesn't need this fix as it doesn't use script tags for
regular async requests.
Closes gh-4778
Ref gh-4771
Ref gh-4773
Ref gh-4379
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, the AJAX script transport only used a script tag to load scripts
for cross-domain requests or ones with `scriptAttrs` set. This commit makes
it also used for all async requests to avoid CSP errors arising from usage
of inline scripts. This also makes `jQuery.getScript` not trigger CSP errors
as it uses the AJAX script transport under the hood.
For sync requests such a change is impossible and that's what `jQuery._evalUrl`
uses. Fixing that is tracked in gh-1895.
The commit also makes other type of requests using the script tag version of the
script transport set its type to "GET", namely async scripts & ones with
`scriptAttrs` set in addition to the existing cross-domain ones.
Fixes gh-3969
Closes gh-4763
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Fixes gh-3028
Ref gh-2612
Useful, for example, to add `nonce`, `integrity`, or `crossorigin`.
|
|
|
|
| |
Fixes gh-3073
|
|
|
|
|
| |
Fixes gh-2584
Closes gh-2643
|
|
|
|
|
|
| |
As noted by @arthurvr
Follow-up for b078a62013782c7424a4a61a240c23c4c0b42614
|
|
|
|
|
|
|
| |
Proposed by @jaubourg
Fixes gh-2432
Closes gh-2588
|
|
|
|
| |
Fixes gh-2056
|
|
|
|
| |
Closes gh-2233
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
they are the last argument of a function call.
|
|
|
|
| |
script tag even if readyState exists.
|
|
|
|
| |
"script.type = text/javascript".
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Removes chainability of ajaxSetup, ajaxPrefilter and ajaxTransport. Also makes sure context is handled properly by ajaxSetup (unit test added).
|
| |
|
|
|
|
| |
doesn't make ajax return false. Had to revise how jsonp and script prefilters & transports work (better separation of concerns). Also took the opportunity to revise jXHR getRequestHeader and abort methods and enabled early transport garbage collection when the request completes.
|
|
|
|
| |
jQuery.ajaxPrefilter and jQuery.ajaxTransport so that proxying the ajax method doesn't turn into a nightmare. Thanks go to scott_gonzalez and DaveMethvin for pointing out the issue. Also made ajaxSetup return "this" to enable chainable definitions -- jQuery.ajaxSetup(...).ajaxPrefilter(...).ajaxTransport(...).
|
|
|
|
| |
will complete the request itself if not done already.
|
| |
|
|
and to avoid a separate prefilters directory).
|