From 09fe30ec39d5569642cfa43cb2e1edba510ed57b Mon Sep 17 00:00:00 2001 From: SGavrl <277843151+SGavrl@users.noreply.github.com> Date: Sat, 13 Jun 2026 15:05:29 +0000 Subject: [PATCH] js: implement Element.getAttributeNames() The method was missing, so calling it threw TypeError: ... is not a function, which broke Vue 3/Nuxt client hydration (issue #297). Back it with the existing attribute_names op, the same source as the attributes getter, so the order matches attributes and outerHTML. --- crates/obscura-js/js/bootstrap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/obscura-js/js/bootstrap.js b/crates/obscura-js/js/bootstrap.js index 85c50be..66f1f59 100644 --- a/crates/obscura-js/js/bootstrap.js +++ b/crates/obscura-js/js/bootstrap.js @@ -1072,6 +1072,7 @@ class Element extends Node { removeAttributeNS(ns, n) { _dom("remove_attribute", this._nid, String(n)); } hasAttribute(n) { return this.getAttribute(n) !== null; } hasAttributes() { return true; } // Simplified + getAttributeNames() { return _domParse("attribute_names", this._nid) || []; } get attributes() { const el = this; const names = _domParse("attribute_names", el._nid) || [];