1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-25 11:13:52 +02:00

@misteroneill exposed createEl on videojs. closes #2926

This commit is contained in:
Pat O'Neill 2016-01-07 23:03:23 -05:00 committed by Gary Katsevman
parent 5f239d7cf1
commit 8ad286a768
4 changed files with 16 additions and 2 deletions

View File

@ -3,6 +3,7 @@ CHANGELOG
## HEAD (Unreleased) ## HEAD (Unreleased)
* @hartman fixed usage of lighten in progress component. Fixes #2793 ([view](https://github.com/videojs/video.js/pull/2875)) * @hartman fixed usage of lighten in progress component. Fixes #2793 ([view](https://github.com/videojs/video.js/pull/2875))
* @misteroneill exposed createEl on videojs ([view](https://github.com/videojs/video.js/pull/2926))
-------------------- --------------------

View File

@ -79,8 +79,9 @@ export function getEl(id){
/** /**
* Creates an element and applies properties. * Creates an element and applies properties.
* *
* @param {String=} tagName Name of tag to be created. * @param {String} [tagName='div'] Name of tag to be created.
* @param {Object=} properties Element properties to be applied. * @param {Object} [properties={}] Element properties to be applied.
* @param {Object} [attributes={}] Element attributes to be applied.
* @return {Element} * @return {Element}
* @function createEl * @function createEl
*/ */

View File

@ -563,6 +563,17 @@ videojs.isEl = Dom.isEl;
*/ */
videojs.isTextNode = Dom.isTextNode; videojs.isTextNode = Dom.isTextNode;
/**
* Creates an element and applies properties.
*
* @method createEl
* @param {String} [tagName='div'] Name of tag to be created.
* @param {Object} [properties={}] Element properties to be applied.
* @param {Object} [attributes={}] Element attributes to be applied.
* @return {Element}
*/
videojs.createEl = Dom.createEl;
/** /**
* Check if an element has a CSS class * Check if an element has a CSS class
* *

View File

@ -86,6 +86,7 @@ test('should expose DOM functions', function() {
let methods = { let methods = {
isEl: 'isEl', isEl: 'isEl',
isTextNode: 'isTextNode', isTextNode: 'isTextNode',
createEl: 'createEl',
hasClass: 'hasElClass', hasClass: 'hasElClass',
addClass: 'addElClass', addClass: 'addElClass',
removeClass: 'removeElClass', removeClass: 'removeElClass',