This speeds up the create test by about 25-30% by avoiding the call
to util.assign() in the createDocument() function. Instead of that
Document#document is now an accessor on the prototype, defaultView
is an instance of a new DefaultView class, whose instances have links
to the document, and finally the interesting constructors that are
exposed via Document instances are all installed on the Document and
DefaultView prototypes instead of the instances.
This speeds up the create test by about 25-30% by avoiding the call to
util.assign()
in thecreateDocument()
function. Instead of thatDocument#document
is now an accessor on the prototype,defaultView
is an instance of a newDefaultView
class, whose instances have links to thedocument
, and finally the interesting constructors that are exposed viaDocument
instances are all installed on theDocument
andDefaultView
prototypes instead of the instances.