nvd3
Version:
A reusable charting library written in d3.js
26 lines (24 loc) • 711 B
JavaScript
/* Facade for queueing DOM write operations
* with Fastdom (https://github.com/wilsonpage/fastdom)
* if available.
* This could easily be extended to support alternate
* implementations in the future.
*/
nv.dom.write = function(callback) {
if (window.fastdom !== undefined) {
return fastdom.mutate(callback);
}
return callback();
};
/* Facade for queueing DOM read operations
* with Fastdom (https://github.com/wilsonpage/fastdom)
* if available.
* This could easily be extended to support alternate
* implementations in the future.
*/
nv.dom.read = function(callback) {
if (window.fastdom !== undefined) {
return fastdom.measure(callback);
}
return callback();
};