mol_jsx_lib 0.0.1445 → 0.0.1446
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.deps.json +1 -1
- package/node.js +1 -1
- package/node.js.map +1 -1
- package/node.mjs +1 -1
- package/node.test.js +9 -2
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +1 -1
- package/web.js.map +1 -1
- package/web.mjs +1 -1
- package/web.test.js +8 -1
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -415,7 +415,7 @@ var $;
|
|
|
415
415
|
if (this[$mol_ambient_ref])
|
|
416
416
|
return this[$mol_ambient_ref];
|
|
417
417
|
const owner = $mol_owning_get(this);
|
|
418
|
-
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
418
|
+
return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
|
|
419
419
|
}
|
|
420
420
|
set $(next) {
|
|
421
421
|
if (this[$mol_ambient_ref])
|
package/web.test.js
CHANGED
|
@@ -2106,7 +2106,7 @@ var $;
|
|
|
2106
2106
|
;
|
|
2107
2107
|
"use strict";
|
|
2108
2108
|
var $;
|
|
2109
|
-
(function ($) {
|
|
2109
|
+
(function ($_1) {
|
|
2110
2110
|
$mol_test({
|
|
2111
2111
|
'init with overload'() {
|
|
2112
2112
|
class X extends $mol_object {
|
|
@@ -2119,6 +2119,13 @@ var $;
|
|
|
2119
2119
|
});
|
|
2120
2120
|
$mol_assert_equal(x.foo(), 2);
|
|
2121
2121
|
},
|
|
2122
|
+
'Context in instance inherits from class'($) {
|
|
2123
|
+
const custom = $.$mol_ambient({});
|
|
2124
|
+
class X extends $.$mol_object {
|
|
2125
|
+
static $ = custom;
|
|
2126
|
+
}
|
|
2127
|
+
$mol_assert_equal(new X().$, custom);
|
|
2128
|
+
},
|
|
2122
2129
|
});
|
|
2123
2130
|
})($ || ($ = {}));
|
|
2124
2131
|
|