1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-10 23:30:03 +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)
* @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.
*
* @param {String=} tagName Name of tag to be created.
* @param {Object=} properties Element properties to be applied.
* @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}
* @function createEl
*/

View File

@ -563,6 +563,17 @@ videojs.isEl = Dom.isEl;
*/
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
*

View File

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