IDScan.net
Search Results for

    Show / Hide Table of Contents

    Wrapper Functions

    updateConfig - will update the configuration used by the 'DVSOIDVC' object.

    The updateConfig function has the following signature

    updateConfig(newConfig: string)
    

    Required Input Parameter

    • newConfig - new web library configuration object that has been stringified using JSON.stringify

    setApplicant - will reinitialize the wrapper with a new applicant ID.

    The setApplicant function has the following signature

    import DVSOIDVC from './Wrapper';
    
    const lib = new DVSOIDVC({
      applicantId: '...',
      domainId: '...',
      publicKey: '...',
      chunkPublicPath: '/customPath/',
      domainApi: '...',
    });
    
    const btn = document.getElementById('btn');
    btn.addEventListener('click', () => {
      const applicantId = 'new applicant id';
      lib.setApplicant(applicantId);
    });
    

    Required Input Parameters

    • applicantId - a GUID that is generated by DIVE Online through the DIVE Online Web API

    restart - will trigger the 'DVSOIDVC' object to be reloaaded, which is useful when updating the configuration.

    showLoader - will display a loading spinner with an optional message to the user

    The showLoader function has the following signature

    showLoader(val: boolean, bottomText?: string, topText?: string)
    

    Required Input Parameters

    • val - a true value will display the spinner and false will hide the spinner

    Optional Input Parameters

    • bottomText - a string that is displayed below the spinner
    • topText - a string that is displayed above the spinner
    Back to top IDScan.net IDScan.net GitHub