mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
HTMLSubtitles constructor validation addedff
This commit is contained in:
parent
312b3d8d15
commit
8ff4990c2f
1 changed files with 4 additions and 0 deletions
|
|
@ -2,6 +2,10 @@ var EventEmitter = require('events');
|
|||
var subtitleUtils = require('./utils/subtitles');
|
||||
|
||||
var HTMLSubtitles = function(containerElement) {
|
||||
if (!(containerElement instanceof HTMLElement)) {
|
||||
throw new Error('Instance of HTMLElement required as a first argument to HTMLSubtitles');
|
||||
}
|
||||
|
||||
var events = new EventEmitter();
|
||||
var tracks = Object.freeze([]);
|
||||
var cues = Object.freeze({});
|
||||
|
|
|
|||
Loading…
Reference in a new issue