12 lines
367 B
JavaScript
12 lines
367 B
JavaScript
'use strict';
|
|
var globalThis = require('../internals/global-this');
|
|
var isObject = require('../internals/is-object');
|
|
|
|
var document = globalThis.document;
|
|
// typeof document.createElement is 'object' in old IE
|
|
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
|
|
module.exports = function (it) {
|
|
return EXISTS ? document.createElement(it) : {};
|
|
};
|