Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[loadFonts] optionally avoid duplicate XHRs for same files; closes #28 #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

graphicore
Copy link
Owner

Supersedes 1969828 in PR #28 by @kontur.

@kontur you can now do something like this:

// Note: I don't mind where you put `globalCache`,
// this is just a really global example.
var globalCache = window.xhrFontCache;
if(!globalCache)
     globalCache = window.xhrFontCache = {};
loadFontsFromUrl(pubsub, fontFiles, globalCache)

Sorry, I didn't test this! I'm waiting for feedback before merging.

@kontur
Copy link
Contributor

kontur commented Feb 22, 2018

I'll try check this out this week/weekend, thanks for this new approach.

@kontur
Copy link
Contributor

kontur commented Feb 26, 2018

Only got around to testing this now, but all works great. Thanks for the review and addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants