src/glkapi.js
function set_references( vm_options )
{
    if ( vm_options.Dialog )
    {
        Dialog = vm_options.Dialog;
    }
    if ( !Dialog )
    {
        if ( typeof window !== 'undefined' && window.Dialog )
        {
            Dialog = window.Dialog;
        }
        else
        {
            throw new Error( 'No reference to Dialog' );
        }
    }

    if ( vm_options.GiDispa )
    {
        GiDispa = vm_options.GiDispa;
    }
    else if ( !GiDispa && typeof window !== 'undefined' && window.GiDispa )
    {
        GiDispa = window.GiDispa;
    }

    if ( vm_options.GiLoad )
    {
        GiLoad = vm_options.GiLoad;
    }
    else if ( !GiLoad && typeof window !== 'undefined' && window.GiLoad )
    {
        GiLoad = window.GiLoad;
    }

    if ( vm_options.GlkOte )
    {
        GlkOte = vm_options.GlkOte;
    }
    if ( !GlkOte )
    {
        if ( typeof window !== 'undefined' && window.GlkOte )
        {
            GlkOte = window.GlkOte;
        }
        else
        {
            throw new Error('No reference to GlkOte');
        }
    }
}
function set_references( vm_options )
{
    if ( vm_options.Dialog )
    {
        Dialog = vm_options.Dialog;
    }
    if ( !Dialog )
    {
        if ( typeof window !== 'undefined' && window.Dialog )
        {
            Dialog = window.Dialog;
        }
        else
        {
            throw new Error( 'No reference to Dialog' );
        }
    }

    if ( vm_options.GiDispa )
    {
        GiDispa = vm_options.GiDispa;
    }
    else if ( !GiDispa && typeof window !== 'undefined' && window.GiDispa )
    {
        GiDispa = window.GiDispa;
    }

    if ( vm_options.GiLoad )
    {
        GiLoad = vm_options.GiLoad;
    }
    else if ( !GiLoad && typeof window !== 'undefined' && window.GiLoad )
    {
        GiLoad = window.GiLoad;
    }

    if ( vm_options.GlkOte )
    {
        GlkOte = vm_options.GlkOte;
    }
    if ( !GlkOte )
    {
        if ( typeof window !== 'undefined' && window.GlkOte )
        {
            GlkOte = window.GlkOte;
        }
        else
        {
            throw new Error('No reference to GlkOte');
        }
    }
}
function set_references ( vm_options ) { if ( vm_options . Dialog ) { Dialog = vm_options . Dialog ; } if ( ! Dialog ) { if ( typeof window !== 'undefined' && window . Dialog ) { Dialog = window . Dialog ; } else { throw new Error ( 'No reference to Dialog' ) ; } } if ( vm_options . GiDispa ) { GiDispa = vm_options . GiDispa ; } else if ( ! GiDispa && typeof window !== 'undefined' && window . GiDispa ) { GiDispa = window . GiDispa ; } if ( vm_options . GiLoad ) { GiLoad = vm_options . GiLoad ; } else if ( ! GiLoad && typeof window !== 'undefined' && window . GiLoad ) { GiLoad = window . GiLoad ; } if ( vm_options . GlkOte ) { GlkOte = vm_options . GlkOte ; } if ( ! GlkOte ) { if ( typeof window !== 'undefined' && window . GlkOte ) { GlkOte = window . GlkOte ; } else { throw new Error ( 'No reference to GlkOte' ) ; } } }
Set external variable references
Set external variable references