如何检测 Modernizr 何时完成所有测试,包括异步测试

How to detect when Modernizr has finished all tests, including asyncronous

据我了解,Modernizr 还附带异步测试,例如videoautoplay,问题出现了我怎么知道它已经完成了。我知道您可以使用 Modernizr.on(feature,cb) 但必须有更通用的方法,对吗?

此功能不存在,但有 open issue for it

目前,您基本上只想跟踪您的异步检测,并使用 Modernizr.on 递减计数器,直到所有计数器都具有 运行