DYEBench should use TodoMVC to test FlightJS for consistency
[WebKit-https.git] / PerformanceTests / DoYouEvenBench / resources / todomvc / dependency-examples / flight / app / js / ui / main_selector.js
1 /*global define */
2 'use strict';
3
4 define([
5     'flight/lib/component'
6 ], function (defineComponent) {
7     function mainSelector() {
8         this.toggle = function (e, data) {
9             var toggle = data.all > 0;
10             this.$node.toggle(toggle);
11         };
12
13         this.after('initialize', function () {
14             this.$node.hide();
15             this.on(document, 'dataStatsCounted', this.toggle);
16         });
17     }
18
19     return defineComponent(mainSelector);
20 });