| function addToBody (msg) { |
| var body = document.getElementsByTagName('body')[0]; |
| var p = body.appendChild(document.createElement('p')) |
| p.appendChild(document.createTextNode(msg)); |
| menuSuite : function (menuClass) { |
| var suite = new Benchmark.Suite; |
| suite.add('Menu#creation', function () { |
| menu = menuClass.create([ |
| ['Untertitel', 'subTitle'], |
| ['Veröffentlichungsdatum', 'pubDate'], |
| suite.add('Menu#next', function () { |
| suite.add('Menu#prev', function () { |
| suite.add('Menu#paging', function () { |
| suite.add('Menu#prefix', function () { |
| menu.prefix('e').show(4); |
| suite.on('error', function(event) { |
| console.log(event.target.error); |
| suite.on('cycle', function(event) { |
| addToBody(String(event.target)); |