Initial commit

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
Francis Bouvier
2023-02-07 16:22:01 +01:00
commit 497a1119f8
12 changed files with 691 additions and 0 deletions

27
src/main.zig Normal file
View File

@@ -0,0 +1,27 @@
const std = @import("std");
const runtime = @import("jsruntime");
const EventTarget = @import("dom/event_target.zig").EventTarget;
const Node = @import("dom/node.zig").Node;
const Document = @import("dom/document.zig").Document;
pub fn main() !void {
// // generate APIs
// _ = comptime runtime.compile(.{ EventTarget, Node, Document });
// // create v8 vm
// const vm = runtime.VM.init();
// defer vm.deinit();
// // document
// var doc = Document.init();
// defer doc.deinit();
// var html: []const u8 = "<div><a href='foo'>OK</a><p>blah-blah-blah</p></div>";
// try doc.parse(html);
// try doc.proto.make_tree();
std.debug.print("ok\n", .{});
}