Function activatePolyfills

  • Activates various polyfills to enable Web5 features in Web environments.

    Parameters

    • Optional options: any = {}

      Configuration options to control the activation of polyfills.

    Returns void

    [options.onCacheCheck.return] - The return object from the callback.

    Example

    // Activate all polyfills with default options, and cache every DRL for 1 minute
    activatePolyfills({
    onCacheCheck(event, route){
    return {
    ttl: 60_000
    }
    }
    });

    Example

    // Activate polyfills, but without Service Worker activation
    activatePolyfills({ serviceWorker: false });