refactor(chapter): PKG-CHAPTER-03 split runtime into typed lifecycle and view modules

This commit is contained in:
Harvey Zhao committed 2026-09-10 23:12:56 +08:00
1 parent a0286c4e95
commit 48660c4e12
23 files changed
+1207 -497

No files matched your search

@@ -0,0 +1,21 @@
import style from './style.less?inline'
export function installStyle() {
if (typeof document === 'undefined')
return
const id = 'artplayer-plugin-chapter'
const install = () => {
let element = document.getElementById(id)
if (!element) {
element = document.createElement('style')
element.id = id
;(document.head || document.documentElement).appendChild(element)
}
element.textContent = style
}
if (document.getElementById(id) || document.readyState !== 'loading')
install()
else
document.addEventListener('DOMContentLoaded', install, { once: true })
}