mirror of
https://codeberg.org/setop/elm-scripting
synced 2025-11-08 21:49:57 +00:00
feat: handle inner.HTML
This commit is contained in:
6
dom.js
6
dom.js
@@ -21,6 +21,10 @@ function Node(parent, tag) {
|
|||||||
print(this.text);
|
print(this.text);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.innerHTML) {
|
||||||
|
print(this.innerHTML);
|
||||||
|
return
|
||||||
|
}
|
||||||
std.printf("<%s", this.tagName)
|
std.printf("<%s", this.tagName)
|
||||||
// Set.difference(other) is not avalable in qjs
|
// Set.difference(other) is not avalable in qjs
|
||||||
for (a of Object.keys(this)) {
|
for (a of Object.keys(this)) {
|
||||||
@@ -53,6 +57,8 @@ document.getElementById = (_id) => { return target}
|
|||||||
document.createElement = (tag) => new Node(null, tag);
|
document.createElement = (tag) => new Node(null, tag);
|
||||||
document.createTextNode = (text) => { t = new Node(null, "#text" ); t.text = text; return t }
|
document.createTextNode = (text) => { t = new Node(null, "#text" ); t.text = text; return t }
|
||||||
|
|
||||||
|
var global = {};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// here will come the Elm app code
|
// here will come the Elm app code
|
||||||
|
|||||||
Reference in New Issue
Block a user