Use the platform as the base interpreter instead of trying to extend it

This commit is contained in:
Jonathan Kelley committed 2024-03-01 14:23:53 -08:00
1 parent 8a969a26dc
commit 0ff0eb7846
10 files changed
+65 -45

No files matched your search

+1 -1
View File
@@ -1 +1 @@
12494364440840058490
13493771420133770074
+10
View File
@@ -159,6 +159,16 @@ System.register("interpreter_core", [], function (exports_2, context_2) {
var id = element.getAttribute("data-dioxus-id");
delete this.local[id];
};
Interpreter.prototype.getNode = function (id) {
return this.nodes[id];
};
Interpreter.prototype.appendChildren = function (id, many) {
var root = this.nodes[id];
var els = this.stack.splice(this.stack.length - many);
for (var k = 0; k < many; k++) {
root.appendChild(els[k]);
}
};
return Interpreter;
}());
exports_2("Interpreter", Interpreter);
+10 -10
View File
@@ -74,6 +74,16 @@ System.register("interpreter_core", [], function (exports_1, context_1) {
var id = element.getAttribute("data-dioxus-id");
delete this.local[id];
};
Interpreter.prototype.getNode = function (id) {
return this.nodes[id];
};
Interpreter.prototype.appendChildren = function (id, many) {
var root = this.nodes[id];
var els = this.stack.splice(this.stack.length - many);
for (var k = 0; k < many; k++) {
root.appendChild(els[k]);
}
};
return Interpreter;
}());
exports_1("Interpreter", Interpreter);
@@ -141,16 +151,6 @@ System.register("interpreter_web", ["interpreter_core"], function (exports_2, co
currentNode = treeWalker.nextNode();
}
};
WebInterpreter.prototype.getNode = function (id) {
return this.nodes[id];
};
WebInterpreter.prototype.appendChildren = function (id, many) {
var root = this.nodes[id];
var els = this.stack.splice(this.stack.length - many);
for (var k = 0; k < many; k++) {
root.appendChild(els[k]);
}
};
return WebInterpreter;
}(interpreter_core_1.Interpreter));
exports_2("WebInterpreter", WebInterpreter);