Initial work on a dom api