-
Notifications
You must be signed in to change notification settings - Fork 645
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
Bug: Duplicate HTML tags for already loaded fonts. #423
Comments
I don't think a "fix" would be necessary as proposed above, but a config option would be awesome. It should provide the ability to optionally include the urls object if the link to the stylesheet is not already included in the DOM. As it stands anybody facing this seems to have to engage in some form of hacked solution to avoid this... |
Anyone with a workaround for this? |
I guess you could do something like this:
|
If there are other links in the head
|
I would consider this a bug, otherwise, please consider this a feature request 🙂
Scenario
Say I make a call to request a specific font at 3 different times during runtime.
Desired behavior
After the first load, the two subsequent calls to WebFont.load gets ignored.
Actual behavior
3 identical HTML tags and 2 reduntant requests.
If you work with webfontloader in a context where fonts are loaded conditionally during runtime, it becomes rather inconvenient to make all the checking before requesting a font.
I hope this will be fixed sometimes soon 😊
The text was updated successfully, but these errors were encountered: