You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
447 B

  1. 'use strict';
  2. /* eslint-env browser */
  3. /*!
  4. * Module dependencies.
  5. */
  6. var Document = require('./document.js');
  7. var BrowserDocument = require('./browserDocument.js');
  8. /**
  9. * Returns the Document constructor for the current context
  10. *
  11. * @api private
  12. */
  13. module.exports = function() {
  14. if (typeof window !== 'undefined' && typeof document !== 'undefined' && document === window.document) {
  15. return BrowserDocument;
  16. }
  17. return Document;
  18. };