isDocument.js 263 B

12345678910111213
  1. var staticDocument = require('./staticDocument')
  2. /**
  3. * 判断是否Document对象
  4. *
  5. * @param {Object} obj 对象
  6. * @return {Boolean}
  7. */
  8. function isDocument (obj) {
  9. return !!(obj && staticDocument && obj.nodeType === 9)
  10. }
  11. module.exports = isDocument