aboutsummaryrefslogtreecommitdiff
path: root/src/z/z.js
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-05-28 18:37:11 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-05-28 18:37:11 +0200
commit35fb9361b2113f4ebc7179b9421f5f3b8a98a6c7 (patch)
treed0edf41dce305830c7e776de5e120a543fb1d1c2 /src/z/z.js
parent567c1fa209b0820444e2ad2c6234af5e4e203a8f (diff)
add timeline
Diffstat (limited to 'src/z/z.js')
-rw-r--r--src/z/z.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/z/z.js b/src/z/z.js
index a5a1b92..ba07b9e 100644
--- a/src/z/z.js
+++ b/src/z/z.js
@@ -47,7 +47,7 @@ class Zenv {
populate_attributes(obj, attrs) {
for (const attr in attrs) {
if (typeof(obj[attr]) == 'object' && typeof(attrs[attr]) == 'object') {
- populate_attributes(obj[attr], attrs[attr]);
+ this.populate_attributes(obj[attr], attrs[attr]);
} else {
obj[attr] = attrs[attr];
}
@@ -56,7 +56,7 @@ class Zenv {
native(name, options) {
const element = document.createElement(name);
- Zenv.populate_attributes(element, options);
+ this.populate_attributes(element, options);
return element;
}
@@ -71,6 +71,10 @@ class Zenv {
by_selector_all(query) {
return this.document.shadowRoot.querySelectorAll(query);
}
+
+ get body() {
+ return this.document.shadowRoot;
+ }
}
Z = new Zenv(document.body);