Angular.js (angular.js-1.7.9) | : | Angular.js (angular.js-1.8.0) | ||
---|---|---|---|---|
skipping to change at line 96 | skipping to change at line 96 | |||
snake_case, | snake_case, | |||
bindJQuery, | bindJQuery, | |||
assertArg, | assertArg, | |||
assertArgFn, | assertArgFn, | |||
assertNotHasOwnProperty, | assertNotHasOwnProperty, | |||
getter, | getter, | |||
getBlockNodes, | getBlockNodes, | |||
hasOwnProperty, | hasOwnProperty, | |||
createMap, | createMap, | |||
stringify, | stringify, | |||
UNSAFE_restoreLegacyJqLiteXHTMLReplacement, | ||||
NODE_TYPE_ELEMENT, | NODE_TYPE_ELEMENT, | |||
NODE_TYPE_ATTRIBUTE, | NODE_TYPE_ATTRIBUTE, | |||
NODE_TYPE_TEXT, | NODE_TYPE_TEXT, | |||
NODE_TYPE_COMMENT, | NODE_TYPE_COMMENT, | |||
NODE_TYPE_DOCUMENT, | NODE_TYPE_DOCUMENT, | |||
NODE_TYPE_DOCUMENT_FRAGMENT | NODE_TYPE_DOCUMENT_FRAGMENT | |||
*/ | */ | |||
//////////////////////////////////// | //////////////////////////////////// | |||
skipping to change at line 791 | skipping to change at line 792 | |||
* This is a non-exhaustive list of object types / features that are not handled correctly by | * This is a non-exhaustive list of object types / features that are not handled correctly by | |||
* `angular.copy`. Note that since this functions is used by the change detectio n code, this | * `angular.copy`. Note that since this functions is used by the change detectio n code, this | |||
* means binding or watching objects of these types (or that include these types ) might not work | * means binding or watching objects of these types (or that include these types ) might not work | |||
* correctly. | * correctly. | |||
* - [`File`](https://developer.mozilla.org/docs/Web/API/File) | * - [`File`](https://developer.mozilla.org/docs/Web/API/File) | |||
* - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_ Objects/Map) | * - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_ Objects/Map) | |||
* - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData) | * - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData) | |||
* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) | * - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) | |||
* - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_ Objects/Set) | * - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_ Objects/Set) | |||
* - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glo bal_Objects/WeakMap) | * - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glo bal_Objects/WeakMap) | |||
* - ['getter'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc | * - [`getter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc | |||
e/Functions/get)/ | e/Functions/get)/ | |||
* [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc | * [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc | |||
e/Functions/set)` | e/Functions/set) | |||
* | * | |||
* @param {*} source The source that will be used to make a copy. Can be any typ e, including | * @param {*} source The source that will be used to make a copy. Can be any typ e, including | |||
* primitives, `null`, and `undefined`. | * primitives, `null`, and `undefined`. | |||
* @param {(Object|Array)=} destination Destination into which the source is cop ied. If provided, | * @param {(Object|Array)=} destination Destination into which the source is cop ied. If provided, | |||
* must be of the same type as `source`. | * must be of the same type as `source`. | |||
* @returns {*} The copy or updated `destination`, if `destination` was specifie d. | * @returns {*} The copy or updated `destination`, if `destination` was specifie d. | |||
* | * | |||
* @example | * @example | |||
<example module="copyExample" name="angular-copy"> | <example module="copyExample" name="angular-copy"> | |||
<file name="index.html"> | <file name="index.html"> | |||
skipping to change at line 1906 | skipping to change at line 1907 | |||
originalCleanData(elems); | originalCleanData(elems); | |||
}; | }; | |||
angular.element = jqLite; | angular.element = jqLite; | |||
// Prevent double-proxying. | // Prevent double-proxying. | |||
bindJQueryFired = true; | bindJQueryFired = true; | |||
} | } | |||
/** | /** | |||
* @ngdoc function | ||||
* @name angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement | ||||
* @module ng | ||||
* @kind function | ||||
* | ||||
* @description | ||||
* Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like | ||||
* `<div /><span />` to `<div></div><span></span>` instead of `<div><span></span | ||||
></div>`. | ||||
* The new behavior is a security fix. Thus, if you need to call this function, | ||||
please try to adjust | ||||
* your code for this change and remove your use of this function as soon as pos | ||||
sible. | ||||
* Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please | ||||
read the | ||||
* [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more de | ||||
tails | ||||
* about the workarounds. | ||||
*/ | ||||
function UNSAFE_restoreLegacyJqLiteXHTMLReplacement() { | ||||
JQLite.legacyXHTMLReplacement = true; | ||||
} | ||||
/** | ||||
* throw error if the argument is falsy. | * throw error if the argument is falsy. | |||
*/ | */ | |||
function assertArg(arg, name, reason) { | function assertArg(arg, name, reason) { | |||
if (!arg) { | if (!arg) { | |||
throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); | throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); | |||
} | } | |||
return arg; | return arg; | |||
} | } | |||
function assertArgFn(arg, name, acceptArrayAnnotation) { | function assertArgFn(arg, name, acceptArrayAnnotation) { | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 30 lines changed or added |