error message more easy to understand

Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
This commit is contained in:
bonjinnorenka 2023-08-29 07:56:52 +09:00 committed by GitHub
parent 024246d1b3
commit 4bb9a618be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ class invidious_embed{
this.eventobject = {ready:[],ended:[],error:[],ratechange:[],volumechange:[],waiting:[],timeupdate:[],loadedmetadata:[],play:[],seeking:[],seeked:[],playerresize:[],pause:[],statechange:[]};
var replace_elemnt;
if(element===undefined||element===null){
throw 'please set element id or HTMLElement';
throw 'Please, pass element id or HTMLElement as first argument';
}
else if(typeof element==='string'){
replace_elemnt = document.getElementById(element);