diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-05-28 18:37:11 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-05-28 18:37:11 +0200 |
| commit | 35fb9361b2113f4ebc7179b9421f5f3b8a98a6c7 (patch) | |
| tree | d0edf41dce305830c7e776de5e120a543fb1d1c2 /src/z | |
| parent | 567c1fa209b0820444e2ad2c6234af5e4e203a8f (diff) | |
add timeline
Diffstat (limited to 'src/z')
| -rw-r--r-- | src/z/z.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |