W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2016

Re: [csswg-drafts] [css-fonts] FontFaceSet uses referential equality for calculating .has()

From: craigkovatch via GitHub <sysbot+gh@w3.org>
Date: Wed, 06 Jul 2016 21:17:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-230909631-1467839824-sysbot+gh@w3.org>
The content I'm rendering (and thus the fonts needed to render) can 
change based on server responses. Currently I'm having to generate a 
hash of all the necessary font properties and store it locally to 
ensure I don't add a duplicate font. But the general question of "is 
this font already defined in the document" seems like a fairly common 
scenario, and one that may be puzzling when .has() is reporting 
referential equality rather than (deep) value equality. 

Is it possible to define a looser comparison function that .has() 
would use? Or would it have to be a separate ability in FontFaceSet?

GitHub Notification of comment by craigkovatch
Please view or discuss this issue at 
using your GitHub account
Received on Wednesday, 6 July 2016 21:17:13 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:00 UTC