🤖 Merge PR #45631 update(angular.js): v1.8 changes by @peterblazejewicz

- `UNSAFE_restoreLegacyJqLiteXHTMLReplacement` method added
- test updated
- version bump

e55d352e94

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz) 2020-06-22 09:48:29 +02:00 committed by GitHub
parent bcc609c6f3
commit 909598b4fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -1481,6 +1481,10 @@ function testIHttpParamSerializerJQLikeProvider() {
});
}
function testJqLiteRestoreBehavior() {
angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement(); // $ExpectType void
}
function anyOf2<T1, T2>(v1: T1, v2: T2) {
return Math.random() < 0.5 ? v1 : v2;
}

View File

@ -188,6 +188,17 @@ declare namespace angular {
* @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with.
*/
resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService;
/**
* 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 so if you use this method, please try to adjust
* to the change & remove the call as soon as possible.
* Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read
* [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details
* about the workarounds.
*/
UNSAFE_restoreLegacyJqLiteXHTMLReplacement(): void;
}
///////////////////////////////////////////////////////////////////////////