mol_wire_dom 0.0.1564 → 0.0.1565

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/node.mjs CHANGED
@@ -647,7 +647,7 @@ var $;
647
647
  if (this[$mol_ambient_ref])
648
648
  return this[$mol_ambient_ref];
649
649
  const owner = $mol_owning_get(this);
650
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
650
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
651
651
  }
652
652
  set $(next) {
653
653
  if (this[$mol_ambient_ref])
package/node.test.js CHANGED
@@ -638,7 +638,7 @@ var $;
638
638
  if (this[$mol_ambient_ref])
639
639
  return this[$mol_ambient_ref];
640
640
  const owner = $mol_owning_get(this);
641
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
641
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
642
642
  }
643
643
  set $(next) {
644
644
  if (this[$mol_ambient_ref])
@@ -2770,7 +2770,7 @@ var $;
2770
2770
  ;
2771
2771
  "use strict";
2772
2772
  var $;
2773
- (function ($) {
2773
+ (function ($_1) {
2774
2774
  $mol_test({
2775
2775
  'init with overload'() {
2776
2776
  class X extends $mol_object {
@@ -2783,6 +2783,13 @@ var $;
2783
2783
  });
2784
2784
  $mol_assert_equal(x.foo(), 2);
2785
2785
  },
2786
+ 'Context in instance inherits from class'($) {
2787
+ const custom = $.$mol_ambient({});
2788
+ class X extends $.$mol_object {
2789
+ static $ = custom;
2790
+ }
2791
+ $mol_assert_equal(new X().$, custom);
2792
+ },
2786
2793
  });
2787
2794
  })($ || ($ = {}));
2788
2795