diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-06-24 15:29:21 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-06-24 15:29:21 -0300 |
commit | 5d551bbbf9d7825e99b417eca5fec47daa3de49c (patch) | |
tree | 9d0a45404c8e7a9064ef1edffaa2869515cb7158 /src/html.js | |
parent | 764eb9c5c26eacc6792bdb1506e2279bd39db2f7 (diff) |
html: use Reflect.ownKeys in Attributes.add() optimization
Diffstat (limited to 'src/html.js')
-rw-r--r-- | src/html.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html.js b/src/html.js index 685b72ca..dd1d1960 100644 --- a/src/html.js +++ b/src/html.js @@ -1168,8 +1168,8 @@ export class Attributes { // Preserve existing merge semantics by funnelling each key through // the internal #addOneAttribute helper (handles class/style union, // unique merging, etc.) but avoid *per-object* validation overhead. - for (const [key, val] of Object.entries(obj)) { - this.#addOneAttribute(key, val); + for (const key of Reflect.ownKeys(obj)) { + this.#addOneAttribute(key, obj[key]); } // Match the original return style (list of results) so callers that |