12345678910111213141516171819202122232425262728293031323334353637 |
- /* global APP */
-
- import React from 'react';
- import ReactDOM from 'react-dom';
-
- import config from './config';
- import { App } from './features/app';
-
- const logger = require('jitsi-meet-logger').getLogger(__filename);
-
- /**
- * Renders the app when the DOM tree has been loaded.
- */
- document.addEventListener('DOMContentLoaded', () => {
- const now = window.performance.now();
-
- APP.connectionTimes['document.ready'] = now;
- logger.log('(TIME) document ready:\t', now);
-
- // Render the main Component.
- ReactDOM.render(
- <App config = { config } />,
- document.getElementById('react'));
- });
-
- /**
- * Stops collecting the logs and disposing the API when the user closes the
- * page.
- */
- window.addEventListener('beforeunload', () => {
- // Stop the LogCollector
- if (APP.logCollectorStarted) {
- APP.logCollector.stop();
- APP.logCollectorStarted = false;
- }
- APP.API.dispose();
- });
|