Expose a lot of dom api as c library.