import { DefaultViewer } from './viewer/defaultViewer' ; import { mapperManager } from './configuration/mappers' ; import { viewerGlobals } from './configuration/globals' ; /**
 * Will attach an init function the the DOMContentLoaded event.
 * The init function will be removed automatically after the event was triggered.
 */ export function initListeners ( ) { document . addEventListener ( "DOMContentLoaded" , init ) ; function init ( event ) { document . removeEventListener ( "DOMContentLoaded" , init ) ; if ( viewerGlobals . disableInit ) { return ; } InitTags ( ) ; } } param selector export function InitTags ( selector = 'babylon' ) { let elements = document . querySelectorAll ( selector ) ; for ( let i = 0 ; i < elements . length ; ++ i ) { let element = elements . item ( i ) ; let configMapper = mapperManager . getMapper ( 'dom' ) ; let config = configMapper . map ( element ) ; let viewer = new DefaultViewer ( element , config ) ; } }