This looks like it is in most standards. I'm happy to do a PR but I need some guidance where this would actually go in the scala-js-dom project. Thoughts?