document-create-element.js 354 B

1234567891011
  1. 'use strict';
  2. var global = require('../internals/global');
  3. var isObject = require('../internals/is-object');
  4. var document = global.document;
  5. // typeof document.createElement is 'object' in old IE
  6. var EXISTS = isObject(document) && isObject(document.createElement);
  7. module.exports = function (it) {
  8. return EXISTS ? document.createElement(it) : {};
  9. };