diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/html.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/html.js b/src/util/html.js index f01e2d87..6124b35d 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -472,6 +472,16 @@ export class Attributes { return this.#attributes; } + get blank() { + const attributeValues = + Object.values(this.#attributes); + + const keepAnyAttributes = + attributeValues.some(value => this.#keepAttributeValue(value)); + + return !keepAnyAttributes; + } + set(attribute, value) { if (value === null || value === undefined) { this.remove(attribute); |