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: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 12 Jul 2016 00:21:03 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-231903958-1468282861-sysbot+gh@w3.org>
I agree that for the suggested usage (a single app trying to dedupe 
its own stuff) a generic and simple string-comparison method would 
work fine.

However, because such a simple method works fine, it's less clear that
 we need to add anything to the spec - it's trivial to write a 
comparison method that iterates over the set and checks if a given 
font is already there.  A native implementation won't be any faster 
than what you can write yourself, as it would have to do 
iterate-and-compare too.  And I'm not sure that the use-case is 
widespread enough to justify shipping an implementation to everyone 
else. :/

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/273#issuecomment-231903958 
using your GitHub account
Received on Tuesday, 12 July 2016 00:21:18 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:33 UTC