Stage Events

The stage will dispatch events as it loads.

  • stage:load
  • stage:prepare

The events dispatch a standard CustomEvent. Listen to them using a standard event listener:

addEventListener('stage:load', (e)=>stages.add(e.detail.stage));

When using a Stage, dispatch events through the convenient function:

class MainStage extends Stage {
    load(){
        this.dispatch('stage:load', {stage:this})
    }
}

Info

keys: dict_keys(['exists', 'path', 'text', 'meta', 'rendered'])
path: stage/events.md
exists: True
meta: dict_keys(['title', 'imports', 'files', 'unused_keys', 'unknown_keys', 'filepath_exists', 'path', 'filepath', 'markdown'])