mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 17:16:16 -08:00
add more control
This commit is contained in:
1 parent
757fbd6596
commit
dfd71c06b6
14 files changed
+230
-77
No files matched your search
+10
-2
@@ -1,4 +1,12 @@
|
||||
import ArtPlayerError from './ArtPlayerError';
|
||||
export class ArtPlayerError extends Error {
|
||||
constructor(message, context) {
|
||||
super(message);
|
||||
if (typeof Error.captureStackTrace === 'function') {
|
||||
Error.captureStackTrace(this, context || this.constructor);
|
||||
}
|
||||
this.name = 'ArtPlayerError';
|
||||
}
|
||||
}
|
||||
|
||||
export function errorHandle(condition, msg) {
|
||||
const isFun = typeof condition === 'function';
|
||||
@@ -33,7 +41,7 @@ export function append(parent, child) {
|
||||
} else {
|
||||
parent.insertAdjacentHTML('beforeend', child);
|
||||
}
|
||||
return parent;
|
||||
return child;
|
||||
}
|
||||
|
||||
export function setStyle(element, styles) {
|
||||
|
||||
Reference in new issue
Block a user