123456789101112131415161718192021222324252627282930 |
- 'use strict';
- /* eslint-env browser */
- /*!
- * Module dependencies.
- */
- const Document = require('./document.js');
- const BrowserDocument = require('./browserDocument.js');
- let isBrowser = false;
- /**
- * Returns the Document constructor for the current context
- *
- * @api private
- */
- module.exports = function() {
- if (isBrowser) {
- return BrowserDocument;
- }
- return Document;
- };
- /*!
- * ignore
- */
- module.exports.setBrowser = function(flag) {
- isBrowser = flag;
- };
|