With switch to `NativeFontWatchRunner`, not all events are fired for all `load` calls
jtsternberg opened this issue · comments
Justin Sternberg commented
With version ≤ 1.6.7, all callbacks would be fired for each WebFont.load()
request. E.g. two alerts would happen in this scenario:
WebFont.load({
active : function() {
alert('WebFont.load active 1', arguments);
},
inactive : function() {
alert('WebFont.load inactive 1', arguments);
},
custom: {
families : [ 'Font Awesome:400' ],
urls : [ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css' ]
}
})
WebFont.load({
active : function() {
alert('WebFont.load active 2', arguments);
},
inactive : function() {
alert('WebFont.load inactive 2', arguments);
},
custom: {
families : [ 'Font Awesome:400' ],
urls : [ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css' ]
}
})
But with ≥ 1.6.8, the callbacks for only one of the load()
calls are fired, so only one alert in the above scenario.
See for yourself:
- webfont/1.6.7: https://jsfiddle.net/jtsternberg/62vyq4Lp/4/
- webfont/1.6.8: https://jsfiddle.net/jtsternberg/h5udev0r/3/
Justin Sternberg commented
Feels like maybe #152 is related.