"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/js/utils/dom.js" between
video.js-7.14.1.tar.gz and video.js-7.14.2.tar.gz

About: Video.js is JavaScript framework for embedding and working with HTML5 and Flash video. It uses the HTML5 video tag as an embed code, and has a common HTML/CSS skin and API for both HTML5 and Flash. Sources. Pre-release.

dom.js  (video.js-7.14.1):dom.js  (video.js-7.14.2)
skipping to change at line 285 skipping to change at line 285
* @param {Element} element * @param {Element} element
* Element to remove a class name from. * Element to remove a class name from.
* *
* @param {string} classToRemove * @param {string} classToRemove
* Class name to remove * Class name to remove
* *
* @return {Element} * @return {Element}
* The DOM element with class name removed. * The DOM element with class name removed.
*/ */
export function removeClass(element, classToRemove) { export function removeClass(element, classToRemove) {
// Protect in case the player gets disposed
if (!element) {
log.warn("removeClass was called with an element that doesn't exist");
return null;
}
if (element.classList) { if (element.classList) {
element.classList.remove(classToRemove); element.classList.remove(classToRemove);
} else { } else {
throwIfWhitespace(classToRemove); throwIfWhitespace(classToRemove);
element.className = element.className.split(/\s+/).filter(function(c) { element.className = element.className.split(/\s+/).filter(function(c) {
return c !== classToRemove; return c !== classToRemove;
}).join(' '); }).join(' ');
} }
return element; return element;
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)