electrum-style-reload

Reload CSS style sheet.

Usage no npm install needed!

<script type="module">
  import electrumStyleReload from 'https://cdn.skypack.dev/electrum-style-reload';
</script>

README

electrum-style-reload

NPM version

Utility functions to reload CSS given their URL.

import {init, reload} from 'electrum-style-reload';

// Initialize the reloader; call this after the page was loaded.
init ();

// Force the browser to reload the specified CSS; this will only
// work if the URL matches an already loaded CSS.
reload ('http://my-site.com/foo.css');