blob: 92441a26dcc31983a1614a951163be86b2e1acbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(function() {
var evaluate = function(node, context) {
if (typeof context === 'undefined') {
context = {};
}
return statementEvaluators[node.className](node.dataset, node.children, context);
};
var statementEvaluators = getStatementEvaluators(evaluate);
document.addEventListener('DOMContentLoaded', function() {
var t0 = performance.now();
evaluate(document.body.children[0]);
var t1 = performance.now();
makeReadable(document.body);
var t2 = performance.now();
console.debug('Evaluated in ' + (t1 - t0) + 'ms');
console.debug('Rendered in ' + (t2 - t1) + 'ms');
});
})();
|