document-create-element.js 340 B

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