Sha256: b9b8dba968a7e001eb9284f42ff85cc9003176b6a88e3b7b70d10fe157bec4bc

Contents?: true

Size: 941 Bytes

Versions: 18

Compression:

Stored size: 941 Bytes

Contents

import isCompatible from './utils/compatibility';
import config from './config';

document.addEventListener('DOMContentLoaded', () => {
    if (!isCompatible) {
        const errorMessage = config.get(
            'compatibility.errorMessage',
            'Unsupported browser!',
        );

        document.body.innerHTML = `<p>${errorMessage}</p>`;

        return;
    }

    document.documentElement.classList.remove('incompatible-browser');

    require('material-design-lite/material');
    require('./mdl-stepper');
    require('babel-polyfill');

    require('./components/initialize').initialize(document, true);

    // Focus first valid input control
    const focusable = document.querySelectorAll('.v-focusable');
    for (var i = 0; i < focusable.length; i++) {
        if (focusable[i] && focusable[i].vComponent) {
            if (focusable[i].vComponent.focus()) {
                break;
            }
        }
    }
});

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
coprl-3.0.0.beta.12 views/mdc/assets/js/app.js
coprl-3.0.0.beta.11 views/mdc/assets/js/app.js
coprl-3.0.0.beta.10 views/mdc/assets/js/app.js
coprl-3.0.0.beta.9 views/mdc/assets/js/app.js
coprl-3.0.0.beta.8 views/mdc/assets/js/app.js
coprl-3.0.0.beta.7 views/mdc/assets/js/app.js
coprl-3.0.0.beta.6 views/mdc/assets/js/app.js
coprl-3.0.0.beta.5 views/mdc/assets/js/app.js
voom-presenters-2.1.2 views/mdc/assets/js/app.js
coprl-3.0.0.beta.4 views/mdc/assets/js/app.js
coprl-3.0.0.beta.3 views/mdc/assets/js/app.js
coprl-3.0.0.beta.2 views/mdc/assets/js/app.js
coprl-3.0.0.beta.1 views/mdc/assets/js/app.js
voom-presenters-2.1.0 views/mdc/assets/js/app.js
voom-presenters-2.0.3 views/mdc/assets/js/app.js
voom-presenters-2.0.2 views/mdc/assets/js/app.js
voom-presenters-2.0.1 views/mdc/assets/js/app.js
voom-presenters-2.0.0 views/mdc/assets/js/app.js