mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
20 lines
433 B
JavaScript
20 lines
433 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
/*!
|
||
|
* Module dependencies.
|
||
|
*/
|
||
|
var Document = require('./document.js');
|
||
|
var BrowserDocument = require('./browserDocument.js');
|
||
|
|
||
|
/**
|
||
|
* Returns the Document constructor for the current context
|
||
|
*
|
||
|
* @api private
|
||
|
*/
|
||
|
module.exports = function() {
|
||
|
if (typeof window !== 'undefined' && typeof document !== 'undefined' && document === window.document) {
|
||
|
return BrowserDocument;
|
||
|
} else {
|
||
|
return Document;
|
||
|
}
|
||
|
};
|