mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
18 lines
394 B
JavaScript
18 lines
394 B
JavaScript
import { module as Module } from 'modujs'
|
|
import { EAGER_FONTS } from '../app'
|
|
import { whenReady } from '../utils/fonts'
|
|
|
|
export default class extends Module {
|
|
constructor(m) {
|
|
super(m)
|
|
}
|
|
|
|
init() {
|
|
whenReady(EAGER_FONTS).then((fonts) => this.onFontsLoaded(fonts))
|
|
}
|
|
|
|
onFontsLoaded(fonts) {
|
|
console.log('Example: Eager Fonts Loaded!', fonts)
|
|
}
|
|
}
|