hasdom
Check if a JavaScript environment has a real DOM
Last updated 3 years ago by damngoto .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hasdom 
SYNC missed versions from official npm registry.

hasdom

Check if a JavaScript environment has a real DOM.

Well, javascript environment is more complicated than you have ever thought. When we talk about environment, most of us knows about web browser and node.js. But that's not complete.

If you have heard some game engines based on javascript such as Egret, Cocos2d-js and layabox, then you will realize that you are misunderstanding this word.

Node.js

npm install hasdom
var hasDOM = require('../dist/hasdom').hasDOM

console.log('dom support: ')
console.log(hasDOM())

Web Page

require(['hasdom'], function(_) {
	document.write('<h1>dom support: ' + _.hasDOM() + '<h1>')
})

Source Code

Written in ECMAScript 6 with AMD / CommonJS / UMD support

Build Tools

  • gulp
  • babel
  • jshint
  • esperanto
  • uglify

Current Tags

  • 0.0.4                                ...           latest (3 years ago)

4 Versions

  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 4
Dependencies (0)
None
Dev Dependencies (6)
Dependents (2)

Copyright 2014 - 2018 © taobao.org |