INNER CODE UNIT · TypeScript

start

gbtami/pychess-variants · client/main.ts:276

function start() {
    const placeholder = document.getElementById('placeholder');
    if (placeholder && el) {
        const dataView = el.getAttribute('data-view') ?? '';
        // Check if we need to show username selection dialog
        if (model.oauthUsernameSelection && model.oauthUsernameSelection.oauth_id) {
            try {
                showUsernameDialog(model.oauthUsernameSelection);
                return; // Don't render the main app until username is selected
            } catch (error) {
                console.error('Error showing username dialog:', error);
                // Continue with normal app rendering if dialog fails
            }
        }

        const renderView = () => {
            patch(placeholder, view(el, model));
            // The controller must be mounted before the engine emits its startup handshake.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…