mirror of
https://github.com/videojs/video.js.git
synced 2025-03-17 21:18:27 +02:00
If you try and require videojs in an environment that doesn't implement `document.createElement` properly -- like in Node.js -- you could potentially get an error. This checks that `window.document && window.document.createElement` is available before calling `createElement`. We specifically check `window.document` so that `global` module won't cause issues with it's shimming of `document.createElement` in `global/document. Fixes #3665