lwc 2.32.1 → 2.33.0

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.
Files changed (41) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +683 -560
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +683 -560
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +593 -467
  5. package/dist/engine-dom/iife/es5/engine-dom.js +121 -95
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +119 -92
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +683 -560
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +593 -467
  11. package/dist/engine-dom/umd/es5/engine-dom.js +121 -95
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +119 -92
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +655 -474
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +655 -474
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +7 -5
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +7 -5
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +7 -5
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +7 -5
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +5 -3
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +5 -3
  36. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service.js +5 -3
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +5 -3
  41. package/package.json +7 -7
@@ -4,7 +4,7 @@ var LWC = (function (exports) {
4
4
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf2(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
5
5
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
6
6
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
9
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf2(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf2(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -13,15 +13,17 @@ var LWC = (function (exports) {
13
13
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
14
  function _getPrototypeOf2(o) { _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf2(o); }
15
15
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
16
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
17
17
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
20
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
19
21
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
22
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
21
23
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
22
24
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
25
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
24
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
26
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
25
27
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
28
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
27
29
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -166,6 +168,9 @@ var LWC = (function (exports) {
166
168
  * The above list of 46 aria attributes is consistent with the following resources:
167
169
  * https://github.com/w3c/aria/pull/708/files#diff-eacf331f0ffc35d4b482f1d15a887d3bR11060
168
170
  * https://wicg.github.io/aom/spec/aria-reflection.html
171
+ *
172
+ * NOTE: If you update this list, please update test files that implicitly reference this list!
173
+ * Searching the codebase for `aria-flowto` and `ariaFlowTo` should be good enough to find all usages.
169
174
  */
170
175
  var AriaPropertyNames = ['ariaActiveDescendant', 'ariaAtomic', 'ariaAutoComplete', 'ariaBusy', 'ariaChecked', 'ariaColCount', 'ariaColIndex', 'ariaColSpan', 'ariaControls', 'ariaCurrent', 'ariaDescribedBy', 'ariaDetails', 'ariaDisabled', 'ariaErrorMessage', 'ariaExpanded', 'ariaFlowTo', 'ariaHasPopup', 'ariaHidden', 'ariaInvalid', 'ariaKeyShortcuts', 'ariaLabel', 'ariaLabelledBy', 'ariaLevel', 'ariaLive', 'ariaModal', 'ariaMultiLine', 'ariaMultiSelectable', 'ariaOrientation', 'ariaOwns', 'ariaPlaceholder', 'ariaPosInSet', 'ariaPressed', 'ariaReadOnly', 'ariaRelevant', 'ariaRequired', 'ariaRoleDescription', 'ariaRowCount', 'ariaRowIndex', 'ariaRowSpan', 'ariaSelected', 'ariaSetSize', 'ariaSort', 'ariaValueMax', 'ariaValueMin', 'ariaValueNow', 'ariaValueText', 'role'];
171
176
  var _ref = /*@__PURE__*/function () {
@@ -326,88 +331,7 @@ var LWC = (function (exports) {
326
331
  CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
327
332
  return propertyName;
328
333
  }
329
- /** version: 2.32.1 */
330
-
331
- /**
332
- * Copyright (C) 2018 salesforce.com, inc.
333
- */
334
-
335
- /*
336
- * Copyright (c) 2018, salesforce.com, inc.
337
- * All rights reserved.
338
- * SPDX-License-Identifier: MIT
339
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
340
- */
341
- function detect(propName) {
342
- return getOwnPropertyDescriptor$1(Element.prototype, propName) === undefined;
343
- }
344
-
345
- /*
346
- * Copyright (c) 2018, salesforce.com, inc.
347
- * All rights reserved.
348
- * SPDX-License-Identifier: MIT
349
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
350
- */
351
- var nodeToAriaPropertyValuesMap = new WeakMap();
352
- function getAriaPropertyMap(elm) {
353
- var map = nodeToAriaPropertyValuesMap.get(elm);
354
- if (map === undefined) {
355
- map = {};
356
- nodeToAriaPropertyValuesMap.set(elm, map);
357
- }
358
- return map;
359
- }
360
- function getNormalizedAriaPropertyValue(value) {
361
- return value == null ? null : String(value);
362
- }
363
- function createAriaPropertyPropertyDescriptor(propName, attrName) {
364
- return {
365
- get: function get() {
366
- var map = getAriaPropertyMap(this);
367
- if (hasOwnProperty$1.call(map, propName)) {
368
- return map[propName];
369
- }
370
- // otherwise just reflect what's in the attribute
371
- return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
372
- },
373
- set: function set(newValue) {
374
- var normalizedValue = getNormalizedAriaPropertyValue(newValue);
375
- var map = getAriaPropertyMap(this);
376
- map[propName] = normalizedValue;
377
- // reflect into the corresponding attribute
378
- if (newValue === null) {
379
- this.removeAttribute(attrName);
380
- } else {
381
- this.setAttribute(attrName, newValue);
382
- }
383
- },
384
- configurable: true,
385
- enumerable: true
386
- };
387
- }
388
- function patch$1(propName) {
389
- // Typescript is inferring the wrong function type for this particular
390
- // overloaded method: https://github.com/Microsoft/TypeScript/issues/27972
391
- // @ts-ignore type-mismatch
392
- var attrName = AriaPropNameToAttrNameMap[propName];
393
- var descriptor = createAriaPropertyPropertyDescriptor(propName, attrName);
394
- Object.defineProperty(Element.prototype, propName, descriptor);
395
- }
396
-
397
- /*
398
- * Copyright (c) 2018, salesforce.com, inc.
399
- * All rights reserved.
400
- * SPDX-License-Identifier: MIT
401
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
402
- */
403
- var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
404
- for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
405
- var propName = ElementPrototypeAriaPropertyNames[_i2];
406
- if (detect(propName)) {
407
- patch$1(propName);
408
- }
409
- }
410
- /** version: 2.32.1 */
334
+ /** version: 2.33.0 */
411
335
 
412
336
  /**
413
337
  * Copyright (C) 2018 salesforce.com, inc.
@@ -428,7 +352,8 @@ var LWC = (function (exports) {
428
352
  ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
429
353
  DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
430
354
  ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null,
431
- ENABLE_FROZEN_TEMPLATE: null
355
+ ENABLE_FROZEN_TEMPLATE: null,
356
+ DISABLE_ARIA_REFLECTION_POLYFILL: null
432
357
  };
433
358
  if (!_globalThis.lwcRuntimeFlags) {
434
359
  Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
@@ -476,6 +401,83 @@ var LWC = (function (exports) {
476
401
  */
477
402
  function setFeatureFlagForTest(name, value) {
478
403
  }
404
+ /** version: 2.33.0 */
405
+
406
+ /**
407
+ * Copyright (C) 2018 salesforce.com, inc.
408
+ */
409
+
410
+ /*
411
+ * Copyright (c) 2018, salesforce.com, inc.
412
+ * All rights reserved.
413
+ * SPDX-License-Identifier: MIT
414
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
415
+ */
416
+ function detect(propName, prototype) {
417
+ return isUndefined$1(getOwnPropertyDescriptor$1(prototype, propName));
418
+ }
419
+
420
+ /*
421
+ * Copyright (c) 2018, salesforce.com, inc.
422
+ * All rights reserved.
423
+ * SPDX-License-Identifier: MIT
424
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
425
+ */
426
+ function createAriaPropertyPropertyDescriptor(attrName) {
427
+ // Note that we need to call this.{get,set,has,remove}Attribute rather than dereferencing
428
+ // from Element.prototype, because these methods are overridden in LightningElement.
429
+ return {
430
+ get: function get() {
431
+ // reflect what's in the attribute
432
+ return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
433
+ },
434
+ set: function set(newValue) {
435
+ // reflect into the corresponding attribute
436
+ if (isNull(newValue)) {
437
+ this.removeAttribute(attrName);
438
+ } else {
439
+ this.setAttribute(attrName, newValue);
440
+ }
441
+ },
442
+ configurable: true,
443
+ enumerable: true
444
+ };
445
+ }
446
+ function patch$1(propName, prototype) {
447
+ var attrName = AriaPropNameToAttrNameMap[propName];
448
+ var descriptor = createAriaPropertyPropertyDescriptor(attrName);
449
+ defineProperty(prototype, propName, descriptor);
450
+ }
451
+
452
+ /*
453
+ * Copyright (c) 2018, salesforce.com, inc.
454
+ * All rights reserved.
455
+ * SPDX-License-Identifier: MIT
456
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
457
+ */
458
+ function applyAriaReflection() {
459
+ var prototype = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Element.prototype;
460
+ var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
461
+ for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
462
+ var propName = ElementPrototypeAriaPropertyNames[_i2];
463
+ if (detect(propName, prototype)) {
464
+ patch$1(propName, prototype);
465
+ }
466
+ }
467
+ }
468
+ /** version: 2.33.0 */
469
+
470
+ /*
471
+ * Copyright (c) 2018, salesforce.com, inc.
472
+ * All rights reserved.
473
+ * SPDX-License-Identifier: MIT
474
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
475
+ */
476
+ if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
477
+ // If DISABLE_ARIA_REFLECTION_POLYFILL is false, then we need to apply the ARIA reflection polyfill globally,
478
+ // i.e. to the global Element.prototype
479
+ applyAriaReflection();
480
+ }
479
481
 
480
482
  /*
481
483
  * Copyright (c) 2018, salesforce.com, inc.
@@ -490,7 +492,7 @@ var LWC = (function (exports) {
490
492
  function flushCallbackQueue() {
491
493
  var callbacks = nextTickCallbackQueue;
492
494
  nextTickCallbackQueue = []; // reset to a new queue
493
- for (var _i3 = 0, _len = callbacks.length; _i3 < _len; _i3 += 1) {
495
+ for (var _i3 = 0, len = callbacks.length; _i3 < len; _i3 += 1) {
494
496
  callbacks[_i3]();
495
497
  }
496
498
  }
@@ -580,7 +582,7 @@ var LWC = (function (exports) {
580
582
  if (!isUndefined$1(reactiveRecord)) {
581
583
  var reactiveObservers = reactiveRecord[key];
582
584
  if (!isUndefined$1(reactiveObservers)) {
583
- for (var _i5 = 0, _len2 = reactiveObservers.length; _i5 < _len2; _i5 += 1) {
585
+ for (var _i5 = 0, len = reactiveObservers.length; _i5 < len; _i5 += 1) {
584
586
  var ro = reactiveObservers[_i5];
585
587
  ro.notify();
586
588
  }
@@ -1824,6 +1826,17 @@ var LWC = (function (exports) {
1824
1826
  lightningBasedDescriptors[propName] = createBridgeToElementDescriptor(propName, HTMLElementOriginalDescriptors[propName]);
1825
1827
  }
1826
1828
  defineProperties(LightningElement.prototype, lightningBasedDescriptors);
1829
+ function applyAriaReflectionToLightningElement() {
1830
+ // If ARIA reflection is not applied globally to Element.prototype, or if we are running server-side,
1831
+ // apply it to LightningElement.prototype.
1832
+ // This allows `this.aria*` property accessors to work from inside a component, and to reflect `aria-*` attrs.
1833
+ applyAriaReflection(LightningElement.prototype);
1834
+ }
1835
+ // The reason for this odd if/else branching is limitations in @lwc/features:
1836
+ // https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#only-works-with-if-statements
1837
+ if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
1838
+ applyAriaReflectionToLightningElement();
1839
+ }
1827
1840
  defineProperty(LightningElement, 'CustomElementConstructor', {
1828
1841
  get: function get() {
1829
1842
  // If required, a runtime-specific implementation must be defined.
@@ -2237,7 +2250,7 @@ var LWC = (function (exports) {
2237
2250
  };
2238
2251
  }
2239
2252
  // expose public methods as props on the new Element Bridge
2240
- for (var _i10 = 0, _len3 = methods.length; _i10 < _len3; _i10 += 1) {
2253
+ for (var _i10 = 0, _len = methods.length; _i10 < _len; _i10 += 1) {
2241
2254
  var methodName = methods[_i10];
2242
2255
  descriptors[methodName] = {
2243
2256
  value: createMethodCaller(methodName),
@@ -2263,6 +2276,20 @@ var LWC = (function (exports) {
2263
2276
  return HTMLBridgeElement;
2264
2277
  }
2265
2278
  var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
2279
+ {
2280
+ // This ARIA reflection only really makes sense in the browser. On the server, there is no `renderedCallback()`,
2281
+ // so you cannot do e.g. `this.template.querySelector('x-child').ariaBusy = 'true'`. So we don't need to expose
2282
+ // ARIA props outside the LightningElement
2283
+ if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
2284
+ // If ARIA reflection is not applied globally to Element.prototype, apply it to HTMLBridgeElement.prototype.
2285
+ // This allows `elm.aria*` property accessors to work from outside a component, and to reflect `aria-*` attrs.
2286
+ // This is especially important because the template compiler compiles aria-* attrs on components to aria* props
2287
+ //
2288
+ // Also note that we apply this to BaseBridgeElement.prototype to avoid excessively redefining property
2289
+ // accessors inside the HTMLBridgeElementFactory.
2290
+ applyAriaReflection(BaseBridgeElement.prototype);
2291
+ }
2292
+ }
2266
2293
  freeze(BaseBridgeElement);
2267
2294
  seal(BaseBridgeElement.prototype);
2268
2295
  function setActiveVM(vm) {
@@ -4000,7 +4027,7 @@ var LWC = (function (exports) {
4000
4027
  }
4001
4028
  function buildParseFragmentFn(createFragmentFn) {
4002
4029
  return function (strings) {
4003
- for (var _len4 = arguments.length, keys = new Array(_len4 > 1 ? _len4 - 1 : 0), _key3 = 1; _key3 < _len4; _key3++) {
4030
+ for (var _len2 = arguments.length, keys = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
4004
4031
  keys[_key3 - 1] = arguments[_key3];
4005
4032
  }
4006
4033
  var cache = create(null);
@@ -6442,7 +6469,7 @@ var LWC = (function (exports) {
6442
6469
  function isNull(obj) {
6443
6470
  return obj === null;
6444
6471
  }
6445
- /** version: 2.32.1 */
6472
+ /** version: 2.33.0 */
6446
6473
 
6447
6474
  /*
6448
6475
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7001,7 +7028,7 @@ var LWC = (function (exports) {
7001
7028
  });
7002
7029
  freeze(LightningElement);
7003
7030
  seal(LightningElement.prototype);
7004
- /* version: 2.32.1 */
7031
+ /* version: 2.33.0 */
7005
7032
 
7006
7033
  exports.LightningElement = LightningElement;
7007
7034
  exports.__unstable__ProfilerControl = profilerControl;