1
0
mirror of https://codeberg.org/setop/elm-scripting synced 2025-11-08 21:49:57 +00:00

handle innerHTML

This commit is contained in:
2025-10-05 01:35:45 +02:00
parent 9566f305b5
commit 6050fb02a3
5 changed files with 17 additions and 6 deletions

10
dom.js
View File

@@ -21,6 +21,10 @@ function Node(parent, tag) {
print(this.text);
return
}
if (this.innerHTML) {
print(this.innerHTML);
return
}
std.printf("<%s", this.tagName)
// Set.difference(other) is not avalable in qjs
for (a of Object.keys(this)) {
@@ -52,3 +56,9 @@ document.getElementById = (_id) => { return target}
document.createElement = (tag) => new Node(null, tag);
document.createTextNode = (text) => { t = new Node(null, "#text" ); t.text = text; return t }
// workaround for elm-explorations/markdown Markdown.toHtml
global = {};