This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/linkedom/cjs/html/text-element.js
T

17 lines
422 B
JavaScript

'use strict';
const {HTMLElement} = require('./element.js');
const {toString} = HTMLElement.prototype;
class TextElement extends HTMLElement {
get innerHTML() { return this.textContent; }
set innerHTML(html) { this.textContent = html; }
toString() {
const outerHTML = toString.call(this.cloneNode());
return outerHTML.replace('><', () => `>${this.textContent}<`);
}
}
exports.TextElement = TextElement