3 ms·
Not sure I understand what you want. If you want to use DOM without JS, web assembly is the only option. If what you want is to call a DOM API without using a b
by lhorie 7y ago
Not sure I understand what you want. If you want to use DOM without JS, web assembly is the only option. If what you want is to call a DOM API without using a browser, there's jsdom. If you want to drive a browser from outside of it there's Chrome Debugger Protocol. But ultimately you'll need a browser if you want to display a UI that is powered by the DOM.
If what you're looking for is a cross-platform API, you could look into React Native, Flutter or Haxe.
- api 7y agoThe DOM is just state in the browser. I'm curious about whether there's any APIs out there to manipulate that state from code outside the browser, e.g. C/C++ code that is including and instantiating a web control. It seems like an obvious idea but I have never seen anyone do it.
- lhorie 7y agoIt sounds like you're looking for something like the Chrome Debugger Protocol. There are wrappers over it such as Puppeteer that let you spawn a browser instance and call arbitrary DOM APIs.