@angular/platform-browser 11.0.2 → 11.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/animations/animations.d.ts +1 -1
- package/animations.d.ts +1 -1
- package/bundles/platform-browser-animations.umd.js +1 -1
- package/bundles/platform-browser-animations.umd.min.js +1 -1
- package/bundles/platform-browser-animations.umd.min.js.map +1 -1
- package/bundles/platform-browser-testing.umd.js +1 -1
- package/bundles/platform-browser-testing.umd.min.js +1 -1
- package/bundles/platform-browser-testing.umd.min.js.map +1 -1
- package/bundles/platform-browser.umd.js +27 -16
- package/bundles/platform-browser.umd.js.map +1 -1
- package/bundles/platform-browser.umd.min.js +11 -12
- package/bundles/platform-browser.umd.min.js.map +1 -1
- package/esm2015/src/browser/browser_adapter.js +2 -2
- package/esm2015/src/browser/meta.js +12 -3
- package/esm2015/src/browser.js +2 -2
- package/esm2015/src/dom/events/hammer_gestures.js +6 -6
- package/esm2015/src/dom/events/key_events.js +3 -3
- package/esm2015/src/security/dom_sanitization_service.js +4 -4
- package/esm2015/src/version.js +1 -1
- package/fesm2015/animations.js +1 -1
- package/fesm2015/platform-browser.js +25 -16
- package/fesm2015/platform-browser.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/package.json +4 -4
- package/platform-browser.d.ts +10 -9
- package/platform-browser.metadata.json +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v11.0.
|
2
|
+
* @license Angular v11.0.3
|
3
3
|
* (c) 2010-2020 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -141,7 +141,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
141
141
|
}
|
142
142
|
performanceNow() {
|
143
143
|
// performance.now() is not available in all browsers, see
|
144
|
-
//
|
144
|
+
// https://caniuse.com/high-resolution-time
|
145
145
|
return window.performance && window.performance.now ? window.performance.now() :
|
146
146
|
new Date().getTime();
|
147
147
|
}
|
@@ -891,7 +891,7 @@ const EVENT_NAMES = {
|
|
891
891
|
'tap': true,
|
892
892
|
};
|
893
893
|
/**
|
894
|
-
* DI token for providing [HammerJS](
|
894
|
+
* DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.
|
895
895
|
* @see `HammerGestureConfig`
|
896
896
|
*
|
897
897
|
* @ngModule HammerModule
|
@@ -905,7 +905,7 @@ const HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');
|
|
905
905
|
*/
|
906
906
|
const HAMMER_LOADER = new InjectionToken('HammerLoader');
|
907
907
|
/**
|
908
|
-
* An injectable [HammerJS Manager](
|
908
|
+
* An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
|
909
909
|
* for gesture recognition. Configures specific event recognition.
|
910
910
|
* @publicApi
|
911
911
|
*/
|
@@ -914,7 +914,7 @@ class HammerGestureConfig {
|
|
914
914
|
/**
|
915
915
|
* A set of supported event names for gestures to be used in Angular.
|
916
916
|
* Angular supports all built-in recognizers, as listed in
|
917
|
-
* [HammerJS documentation](
|
917
|
+
* [HammerJS documentation](https://hammerjs.github.io/).
|
918
918
|
*/
|
919
919
|
this.events = [];
|
920
920
|
/**
|
@@ -930,13 +930,13 @@ class HammerGestureConfig {
|
|
930
930
|
* Properties that are not present take the HammerJS default values.
|
931
931
|
* For information about which properties are supported for which events,
|
932
932
|
* and their allowed and default values, see
|
933
|
-
* [HammerJS documentation](
|
933
|
+
* [HammerJS documentation](https://hammerjs.github.io/).
|
934
934
|
*
|
935
935
|
*/
|
936
936
|
this.overrides = {};
|
937
937
|
}
|
938
938
|
/**
|
939
|
-
* Creates a [HammerJS Manager](
|
939
|
+
* Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
|
940
940
|
* and attaches it to a given HTML element.
|
941
941
|
* @param element The element that will recognize gestures.
|
942
942
|
* @returns A HammerJS event-manager object.
|
@@ -1098,7 +1098,7 @@ const DOM_KEY_LOCATION_NUMPAD = 3;
|
|
1098
1098
|
// Map to convert some key or keyIdentifier values to what will be returned by getEventKey
|
1099
1099
|
const _keyMap = {
|
1100
1100
|
// The following values are here for cross-browser compatibility and to match the W3C standard
|
1101
|
-
// cf
|
1101
|
+
// cf https://www.w3.org/TR/DOM-Level-3-Events-key/
|
1102
1102
|
'\b': 'Backspace',
|
1103
1103
|
'\t': 'Tab',
|
1104
1104
|
'\x7F': 'Delete',
|
@@ -1265,7 +1265,7 @@ function getEventKey(event) {
|
|
1265
1265
|
key = event.keyIdentifier;
|
1266
1266
|
// keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
|
1267
1267
|
// Safari cf
|
1268
|
-
//
|
1268
|
+
// https://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
|
1269
1269
|
if (key == null) {
|
1270
1270
|
return 'Unidentified';
|
1271
1271
|
}
|
@@ -1316,7 +1316,7 @@ function getEventKey(event) {
|
|
1316
1316
|
* @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
|
1317
1317
|
* sanitization for the value passed in. Carefully check and audit all values and code paths going
|
1318
1318
|
* into this call. Make sure any user data is appropriately escaped for this security context.
|
1319
|
-
* For more detail, see the [Security Guide](
|
1319
|
+
* For more detail, see the [Security Guide](https://g.co/ng/security).
|
1320
1320
|
*
|
1321
1321
|
* @publicApi
|
1322
1322
|
*/
|
@@ -1365,9 +1365,9 @@ class DomSanitizerImpl extends DomSanitizer {
|
|
1365
1365
|
if (ɵallowSanitizationBypassAndThrow(value, "ResourceURL" /* ResourceUrl */)) {
|
1366
1366
|
return ɵunwrapSafeValue(value);
|
1367
1367
|
}
|
1368
|
-
throw new Error('unsafe value used in a resource URL context (see
|
1368
|
+
throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');
|
1369
1369
|
default:
|
1370
|
-
throw new Error(`Unexpected SecurityContext ${ctx} (see
|
1370
|
+
throw new Error(`Unexpected SecurityContext ${ctx} (see https://g.co/ng/security#xss)`);
|
1371
1371
|
}
|
1372
1372
|
}
|
1373
1373
|
bypassSecurityTrustHtml(value) {
|
@@ -1427,7 +1427,7 @@ const BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];
|
|
1427
1427
|
/**
|
1428
1428
|
* @security Replacing built-in sanitization providers exposes the application to XSS risks.
|
1429
1429
|
* Attacker-controlled data introduced by an unsanitized provider could expose your
|
1430
|
-
* application to XSS risks. For more detail, see the [Security Guide](
|
1430
|
+
* application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security).
|
1431
1431
|
* @publicApi
|
1432
1432
|
*/
|
1433
1433
|
const BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__PRE_R3__;
|
@@ -1652,7 +1652,7 @@ class Meta {
|
|
1652
1652
|
return element;
|
1653
1653
|
}
|
1654
1654
|
_setMetaElementAttributes(tag, el) {
|
1655
|
-
Object.keys(tag).forEach((prop) => el.setAttribute(prop, tag[prop]));
|
1655
|
+
Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));
|
1656
1656
|
return el;
|
1657
1657
|
}
|
1658
1658
|
_parseSelector(tag) {
|
@@ -1660,7 +1660,10 @@ class Meta {
|
|
1660
1660
|
return `${attr}="${tag[attr]}"`;
|
1661
1661
|
}
|
1662
1662
|
_containsAttributes(tag, elem) {
|
1663
|
-
return Object.keys(tag).every((key) => elem.getAttribute(key) === tag[key]);
|
1663
|
+
return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);
|
1664
|
+
}
|
1665
|
+
_getMetaKeyMap(prop) {
|
1666
|
+
return META_KEYS_MAP[prop] || prop;
|
1664
1667
|
}
|
1665
1668
|
}
|
1666
1669
|
Meta.ɵprov = ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: "root" });
|
@@ -1670,6 +1673,12 @@ Meta.decorators = [
|
|
1670
1673
|
Meta.ctorParameters = () => [
|
1671
1674
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
1672
1675
|
];
|
1676
|
+
/**
|
1677
|
+
* Mapping for MetaDefinition properties with their correct meta attribute names
|
1678
|
+
*/
|
1679
|
+
const META_KEYS_MAP = {
|
1680
|
+
httpEquiv: 'http-equiv'
|
1681
|
+
};
|
1673
1682
|
|
1674
1683
|
/**
|
1675
1684
|
* @license
|
@@ -2052,7 +2061,7 @@ function elementMatches(n, selector) {
|
|
2052
2061
|
/**
|
2053
2062
|
* @publicApi
|
2054
2063
|
*/
|
2055
|
-
const VERSION = new Version('11.0.
|
2064
|
+
const VERSION = new Version('11.0.3');
|
2056
2065
|
|
2057
2066
|
/**
|
2058
2067
|
* @license
|