BigW Consortium Gitlab

sidebar_bundle.js 410 Bytes
Newer Older
1
import Mediator from './sidebar_mediator';
2
import mountSidebar from './mount_sidebar';
3

Clement Ho committed
4
function domContentLoaded() {
5 6
  const sidebarOptions = JSON.parse(document.querySelector('.js-sidebar-options').innerHTML);
  const mediator = new Mediator(sidebarOptions);
7 8
  mediator.fetch();

9
  mountSidebar(mediator);
Clement Ho committed
10
}
11

Clement Ho committed
12 13 14
document.addEventListener('DOMContentLoaded', domContentLoaded);

export default domContentLoaded;