-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support require()-ing video.js #3889
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,15 @@ function classRegExp(className) { | |
return new RegExp('(^|\\s)' + className + '($|\\s)'); | ||
} | ||
|
||
/** | ||
* Whether the current DOM interface appears to be real. | ||
* | ||
* @return {Boolean} | ||
*/ | ||
export function isReal() { | ||
return document === window.document && typeof document.createElement === 'function'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this would need a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since we're using |
||
} | ||
|
||
/** | ||
* Determines, via duck typing, whether or not a value is a DOM element. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setTimeout
is a global in node too, so this change isn't really neededThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but it's consistent with the rest of the codebase where we are using
window.setTimeout
, which will work in Node because we're using theglobal
package.