src/index.js
/**
 * Called in BattleCouch.Init() to enable mouse click support on simulator.
 */
Called in BattleCouch.Init() to enable mouse click support on simulator.
Called in BattleCouch . Init () to enable mouse click support on simulator .
function CheckBrowserSupport()
{
    if(BattleCouch.IsSimulator() || UseMouseClick())
    {
        if (!('ontouchstart' in document.createElement('div')))
        {
            let elements = document.getElementsByTagName('*');
            for (let i = 0; i < elements.length; ++i)
            {
                let element = elements[i];
                let onTouchStartAttribute = element.getAttribute('ontouchstart');
                let onTouchEndAttribute = element.getAttribute('ontouchend');
                if (onTouchStartAttribute)
                    element.setAttribute('onmousedown', onTouchStartAttribute);
                if (onTouchEndAttribute)
                    element.setAttribute('onmouseup', onTouchEndAttribute);
            }
        }
    }
}
function CheckBrowserSupport ( ) { if ( BattleCouch . IsSimulator ( ) || UseMouseClick ( ) ) { if ( ! ( 'ontouchstart' in document . createElement ( 'div' ) ) ) { let elements = document . getElementsByTagName ( '*' ) ; for ( let i = 0 ; i < elements . length ; ++ i ) { let element = elements [ i ] ; let onTouchStartAttribute = element . getAttribute ( 'ontouchstart' ) ; let onTouchEndAttribute = element . getAttribute ( 'ontouchend' ) ; if ( onTouchStartAttribute ) element . setAttribute ( 'onmousedown' , onTouchStartAttribute ) ; if ( onTouchEndAttribute ) element . setAttribute ( 'onmouseup' , onTouchEndAttribute ) ; } } } }
Called in BattleCouch.Init() to enable mouse click support on simulator.
Called in BattleCouch . Init () to enable mouse click support on simulator .
// Note : Not working on React components