summaryrefslogblamecommitdiff
path: root/src/renderer/customEvents.ts
blob: dbdce314c4c3d4bd14f4cf71f0308c9e5f479761 (plain) (tree)
1
2
3
4
5
6
7






                                                                                      
export function switchPage(sitetype:"SERVER"|"INTERN",page:string,subPage?:string){
  const event = new CustomEvent('site-changed', { detail:{sitetype, page, subPage} });
  const elements = document.getElementsByClassName("switch-page-event");
  for (let i = 0; i < elements.length; i++) {
    elements[i].dispatchEvent(event);
  }
}