Fixed a style issue.
Added support for CustomToJSObject, which helps to distinguish which subclass to use for some generic wrappers. For example, window.document will now return an HTMLDocument instead of a plain Document.
Using the correct document for the custom HTMLDocument functions.