aberdeen 1.7.3 → 1.7.4

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.
@@ -361,6 +361,16 @@ export declare function clone<T extends object>(src: T): T;
361
361
  * ```
362
362
  */
363
363
  export declare function ref<T extends TargetType, K extends keyof T>(target: T, index: K): ValueRef<T[K]>;
364
+ /**
365
+ * Make the `create` and `destroy` special properties no-ops.
366
+ *
367
+ * This is useful from within automated testing environments, where the transitioning
368
+ * new and lingering old elements may make writing reliable selectors difficult.
369
+ *
370
+ * As this is only intended for testing, there's no way to re-enable the special properties
371
+ * once disabled.
372
+ */
373
+ export declare function disableCreateDestroy(): void;
364
374
  /**
365
375
  * The core function for building reactive user interfaces in Aberdeen. It creates and inserts new DOM elements
366
376
  * and sets attributes/properties/event listeners on DOM elements. It does so in a reactive way, meaning that
package/dist/aberdeen.js CHANGED
@@ -1253,6 +1253,9 @@ var SPECIAL_PROPS = {
1253
1253
  addNode(el, document.createTextNode(value));
1254
1254
  }
1255
1255
  };
1256
+ function disableCreateDestroy() {
1257
+ SPECIAL_PROPS.create = SPECIAL_PROPS.destroy = () => {};
1258
+ }
1256
1259
  function $(...args) {
1257
1260
  let el = currentScope.el;
1258
1261
  let svg = currentScope.svg;
@@ -1700,6 +1703,7 @@ export {
1700
1703
  insertGlobalCss,
1701
1704
  insertCss,
1702
1705
  dump,
1706
+ disableCreateDestroy,
1703
1707
  derive,
1704
1708
  defaultEmitHandler,
1705
1709
  darkMode,
@@ -1712,5 +1716,5 @@ export {
1712
1716
  $
1713
1717
  };
1714
1718
 
1715
- //# debugId=86B5E6A80A83D28664756E2164756E21
1719
+ //# debugId=9A7CA6334D13563C64756E2164756E21
1716
1720
  //# sourceMappingURL=aberdeen.js.map