That’s still only part of what you need. You
could pretend the native window client area was a <canvas> and give the code a GPUCanvasContext that renders to it, but you still need to do
something about handling user input, what happens when the window size changes,
&c. &c. And if you’re working with such minimal primitives, you won’t be able to make something that looks or feels even vaguely native.
The browser gives you a lot of valuable functionality.