Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@flourish/font-watcher

Package Overview
Dependencies
Maintainers
12
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flourish/font-watcher

Calls update() when new fonts are loaded

latest
npmnpm
Version
0.0.2
Version published
Weekly downloads
519
-5.81%
Maintainers
12
Weekly downloads
 
Created
Source

Flourish font watcher

The function exported from this module will call window.template.update() (or another function) when any new fonts are loaded.

How to install

npm install -s @flourish/font-watcher

Then import it with:

import addFontWatcher from "@flourish/font-watcher";

Usage

If no callback is specified, then addFontWatcher will call window.template.update() whenever it detects that a new font has been loaded:

addFontWatcher();

If you supply a callback, then it will be called with a FontFaceSetLoadEvent object as the parameter. For example, you can do:

addFontWatcher(function () {
    console.log("Fonts have loaded");
});

FAQs

Package last updated on 12 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts